2019-10-23 13:06:54 -04:00
|
|
|
import Controller from "@ember/controller";
|
2018-07-19 14:33:11 -04:00
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
import PeriodComputationMixin from "admin/mixins/period-computation";
|
|
|
|
|
2019-10-23 13:06:54 -04:00
|
|
|
export default Controller.extend(PeriodComputationMixin, {
|
2018-07-19 14:33:11 -04:00
|
|
|
@computed
|
|
|
|
flagsStatusOptions() {
|
|
|
|
return {
|
|
|
|
table: {
|
|
|
|
total: false,
|
|
|
|
perPage: 10
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2018-10-26 09:59:04 -04:00
|
|
|
@computed
|
2018-11-12 16:23:10 -05:00
|
|
|
userFlaggingRatioOptions() {
|
2018-10-26 09:59:04 -04:00
|
|
|
return {
|
|
|
|
table: {
|
|
|
|
total: false,
|
|
|
|
perPage: 10
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2018-07-27 01:22:00 -04:00
|
|
|
@computed("startDate", "endDate")
|
|
|
|
filters(startDate, endDate) {
|
|
|
|
return { startDate, endDate };
|
|
|
|
},
|
|
|
|
|
|
|
|
@computed("lastWeek", "endDate")
|
|
|
|
lastWeekfilters(startDate, endDate) {
|
|
|
|
return { startDate, endDate };
|
|
|
|
},
|
|
|
|
|
2018-07-19 14:33:11 -04:00
|
|
|
_reportsForPeriodURL(period) {
|
|
|
|
return Discourse.getURL(`/admin/dashboard/moderation?period=${period}`);
|
|
|
|
}
|
|
|
|
});
|