This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +26
-1
lines changed Expand file tree Collapse file tree 4 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11<div class =" sentiment section" >
22 <div class =" period-section" >
33 <div class =" section-title" >
4- <h2 >
4+ <h2 id = " sentiment-heading " >
55 {{ i18n " discourse_ai.sentiments.dashboard.title" }}
66 </h2 >
77
Original file line number Diff line number Diff line change 1+ import { apiInitializer } from "discourse/lib/api" ;
2+
3+ export default apiInitializer ( "1.15.0" , ( api ) => {
4+ const settings = api . container . lookup ( "service:site-settings" ) ;
5+
6+ if ( settings . ai_sentiment_enabled ) {
7+ api . addAdminSidebarSectionLink ( "reports" , {
8+ name : "sentiment_overview" ,
9+ href : "/admin/dashboard/sentiment#sentiment-heading" ,
10+ label : "discourse_ai.sentiments.sidebar.overview" ,
11+ icon : "chart-column" ,
12+ } ) ;
13+ api . addAdminSidebarSectionLink ( "reports" , {
14+ name : "sentiment_analysis" ,
15+ route : "adminReports.show" ,
16+ routeModels : [ "sentiment_analysis" ] ,
17+ label : "discourse_ai.sentiments.sidebar.analysis" ,
18+ icon : "chart-pie" ,
19+ } ) ;
20+ }
21+ } ) ;
Original file line number Diff line number Diff line change 652652 sentiments :
653653 dashboard :
654654 title : " Sentiment"
655+ sidebar :
656+ overview : " Sentiment overview"
657+ analysis : " Sentiment analysis"
655658 sentiment_analysis :
656659 filter_types :
657660 all : " All"
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ def self.public_asset_path(name)
123123 end
124124
125125 plugin_icons = %w[
126+ chart-column
126127 spell-check
127128 language
128129 images
You can’t perform that action at this time.
0 commit comments