2018-06-15 17:03:24 +02:00
|
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
2017-12-04 12:14:43 -05:00
|
|
|
|
|
|
|
export default Ember.Controller.extend(ModalFunctionality, {
|
|
|
|
loading: null,
|
|
|
|
historyTarget: null,
|
|
|
|
history: null,
|
|
|
|
|
|
|
|
onShow() {
|
2018-06-15 17:03:24 +02:00
|
|
|
this.set("loading", true);
|
|
|
|
this.set("history", null);
|
2017-12-04 12:14:43 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
loadHistory(target) {
|
2018-06-15 17:03:24 +02:00
|
|
|
this.store
|
|
|
|
.findAll("moderation-history", target)
|
|
|
|
.then(result => {
|
|
|
|
this.set("history", result);
|
|
|
|
})
|
|
|
|
.finally(() => this.set("loading", false));
|
2017-12-04 12:14:43 -05:00
|
|
|
}
|
|
|
|
});
|