Files
discourse-ai/assets/javascripts/discourse/components/admin-report-emotion.hbs
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

53 lines
1.3 KiB
Handlebars

<div class="cell title">
{{#if this.model.icon}}
{{d-icon this.model.icon}}
{{/if}}
{{this.model.title}}
</div>
<div class="cell value today-count">
<a
href="{{this.filterURL}}activity-after%3A{{this.today}}%20order%3A{{this.model.type}}"
>
{{number this.model.todayCount}}
</a>
</div>
<div
class="cell value yesterday-count {{this.model.yesterdayTrend}}"
title={{this.model.yesterdayCountTitle}}
>
<a
href="{{this.filterURL}}activity-after%3A{{this.yesterday}}%20order%3A{{this.model.type}}"
>
{{number this.model.yesterdayCount}}
</a>
{{d-icon this.model.yesterdayTrendIcon}}
</div>
<div
class="cell value sevendays-count {{this.model.sevenDaysTrend}}"
title={{this.model.sevenDaysCountTitle}}
>
<a
href="{{this.filterURL}}activity-after%3A{{this.lastWeek}}%20order%3A{{this.model.type}}"
>
{{number this.model.lastSevenDaysCount}}
</a>
{{d-icon this.model.sevenDaysTrendIcon}}
</div>
<div
class="cell value thirty-days-count {{this.model.thirtyDaysTrend}}"
title={{this.model.thirtyDaysCountTitle}}
>
<a
href="{{this.filterURL}}activity-after%3A{{this.lastMonth}}%20order%3A{{this.model.type}}"
>
{{number this.model.lastThirtyDaysCount}}
</a>
{{#if this.model.canDisplayTrendIcon}}
{{d-icon this.model.thirtyDaysTrendIcon}}
{{/if}}
</div>