Files
discourse-ai/assets/javascripts/discourse/controllers/admin-dashboard-sentiment.js
T
Rafael dos Santos Silva 2c8d81827f FIX: Misc fixes for sentiment in the admin dashboard (#928)
* FIX: Misc fixes for sentiment in the admin dashboard

- Fixes missing filters for the main graph

- Fixes previous 30 days trend in emotion table

Also moves links to individual cells in emotion table, so admins can
drill down to the specific time period on their reports.

* lints
2024-11-19 19:16:21 -03:00

44 lines
908 B
JavaScript

import { computed } from "@ember/object";
import AdminDashboardTabController from "admin/controllers/admin-dashboard-tab";
export default class AdminDashboardSentiment extends AdminDashboardTabController {
@computed("startDate", "endDate")
get filters() {
return { startDate: this.startDate, endDate: this.endDate };
}
get emotions() {
const emotions = [
"admiration",
"amusement",
"anger",
"annoyance",
"approval",
"caring",
"confusion",
"curiosity",
"desire",
"disappointment",
"disapproval",
"disgust",
"embarrassment",
"excitement",
"fear",
"gratitude",
"grief",
"joy",
"love",
"nervousness",
"neutral",
"optimism",
"pride",
"realization",
"relief",
"remorse",
"sadness",
"surprise",
];
return emotions;
}
}