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