mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 17:23:44 +08:00
40 lines
882 B
JavaScript
40 lines
882 B
JavaScript
import discourseComputed from "discourse-common/utils/decorators";
|
|
import Controller from "@ember/controller";
|
|
import PeriodComputationMixin from "admin/mixins/period-computation";
|
|
|
|
export default Controller.extend(PeriodComputationMixin, {
|
|
@discourseComputed
|
|
flagsStatusOptions() {
|
|
return {
|
|
table: {
|
|
total: false,
|
|
perPage: 10
|
|
}
|
|
};
|
|
},
|
|
|
|
@discourseComputed
|
|
userFlaggingRatioOptions() {
|
|
return {
|
|
table: {
|
|
total: false,
|
|
perPage: 10
|
|
}
|
|
};
|
|
},
|
|
|
|
@discourseComputed("startDate", "endDate")
|
|
filters(startDate, endDate) {
|
|
return { startDate, endDate };
|
|
},
|
|
|
|
@discourseComputed("lastWeek", "endDate")
|
|
lastWeekfilters(startDate, endDate) {
|
|
return { startDate, endDate };
|
|
},
|
|
|
|
_reportsForPeriodURL(period) {
|
|
return Discourse.getURL(`/admin/dashboard/moderation?period=${period}`);
|
|
}
|
|
});
|