This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/explain-reviewable.js.es6
Robin Ward bde0ef865f
FEATURE: Adds a pop up that shows a more detailed score for reviewables (#8035)
If you click a (?) icon beside the reviewable status a pop up will
appear with expanded informatio that explains how the reviewable got its
score, and how it compares to system thresholds.
2019-09-04 09:56:25 -06:00

16 lines
459 B
JavaScript

import ModalFunctionality from "discourse/mixins/modal-functionality";
export default Ember.Controller.extend(ModalFunctionality, {
loading: null,
reviewableExplanation: null,
onShow() {
this.setProperties({ loading: true, reviewableExplanation: null });
this.store
.find("reviewable-explanation", this.model.id)
.then(result => this.set("reviewableExplanation", result))
.finally(() => this.set("loading", false));
}
});