2019-11-08 05:38:28 +08:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2019-10-24 01:06:54 +08:00
|
|
|
import Controller from "@ember/controller";
|
2018-07-20 02:33:11 +08:00
|
|
|
import PeriodComputationMixin from "admin/mixins/period-computation";
|
|
|
|
|
2019-10-24 01:06:54 +08:00
|
|
|
export default Controller.extend(PeriodComputationMixin, {
|
2019-11-08 05:38:28 +08:00
|
|
|
@discourseComputed
|
2018-07-20 02:33:11 +08:00
|
|
|
flagsStatusOptions() {
|
|
|
|
return {
|
|
|
|
table: {
|
|
|
|
total: false,
|
|
|
|
perPage: 10
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2019-11-08 05:38:28 +08:00
|
|
|
@discourseComputed
|
2018-11-13 05:23:10 +08:00
|
|
|
userFlaggingRatioOptions() {
|
2018-10-26 21:59:04 +08:00
|
|
|
return {
|
|
|
|
table: {
|
|
|
|
total: false,
|
|
|
|
perPage: 10
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2019-11-08 05:38:28 +08:00
|
|
|
@discourseComputed("startDate", "endDate")
|
2018-07-27 13:22:00 +08:00
|
|
|
filters(startDate, endDate) {
|
|
|
|
return { startDate, endDate };
|
|
|
|
},
|
|
|
|
|
2019-11-08 05:38:28 +08:00
|
|
|
@discourseComputed("lastWeek", "endDate")
|
2018-07-27 13:22:00 +08:00
|
|
|
lastWeekfilters(startDate, endDate) {
|
|
|
|
return { startDate, endDate };
|
|
|
|
},
|
|
|
|
|
2018-07-20 02:33:11 +08:00
|
|
|
_reportsForPeriodURL(period) {
|
|
|
|
return Discourse.getURL(`/admin/dashboard/moderation?period=${period}`);
|
|
|
|
}
|
|
|
|
});
|