diff --git a/.discourse-compatibility b/.discourse-compatibility index 7ff13486..e8e40b3c 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,3 +1,4 @@ +< 3.2.0.beta5-dev: c70f43f130fb98e4a1adb1afd9b621aaa49088e3 < 3.2.0.beta4-dev: 493b48477a9288f2f1b6f021954088705a6673d6 < 3.2.0.beta2-dev: 3bced1c6f525553fe2b5b79d29bd66c1cf2a47d5 3.1.999: c0415bb7eb878b1b7abf112d65cba981030df8df diff --git a/assets/javascripts/discourse/controllers/admin-dashboard-sentiment.js b/assets/javascripts/discourse/controllers/admin-dashboard-sentiment.js index 75d12e54..6de5b249 100644 --- a/assets/javascripts/discourse/controllers/admin-dashboard-sentiment.js +++ b/assets/javascripts/discourse/controllers/admin-dashboard-sentiment.js @@ -1,38 +1,9 @@ -import Controller from "@ember/controller"; -import { action } from "@ember/object"; -import { inject as service } from "@ember/service"; -import getURL from "discourse-common/lib/get-url"; -import discourseComputed from "discourse-common/utils/decorators"; -import CustomDateRangeModal from "admin/components/modal/custom-date-range"; -import PeriodComputationMixin from "admin/mixins/period-computation"; +import { computed } from "@ember/object"; +import AdminDashboardTabController from "admin/controllers/admin-dashboard-tab"; -export default class AdminDashboardSentiment extends Controller.extend( - PeriodComputationMixin -) { - @service modal; - - @discourseComputed("startDate", "endDate") - filters(startDate, endDate) { - return { startDate, endDate }; - } - - _reportsForPeriodURL(period) { - return getURL(`/admin/dashboard/sentiment?period=${period}`); - } - - @action - setCustomDateRange(startDate, endDate) { - this.setProperties({ startDate, endDate }); - } - - @action - openCustomDateRangeModal() { - this.modal.show(CustomDateRangeModal, { - model: { - startDate: this.startDate, - endDate: this.endDate, - setCustomDateRange: this.setCustomDateRange, - }, - }); +export default class AdminDashboardSentiment extends AdminDashboardTabController { + @computed("startDate", "endDate") + get filters() { + return { startDate: this.startDate, endDate: this.endDate }; } } diff --git a/assets/javascripts/discourse/templates/admin-dashboard-sentiment.hbs b/assets/javascripts/discourse/templates/admin-dashboard-sentiment.hbs index 7cfb8495..bdbf3a29 100644 --- a/assets/javascripts/discourse/templates/admin-dashboard-sentiment.hbs +++ b/assets/javascripts/discourse/templates/admin-dashboard-sentiment.hbs @@ -4,20 +4,14 @@