Skip to content

Commit 890484f

Browse files
authored
Navigation: Allow apps to show IsNew badge in the navigation menu (#103608)
1 parent a7197d0 commit 890484f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/services/navtree/navtreeimpl/applinks.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ func (s *ServiceImpl) addPluginToSection(c *contextmodel.ReqContext, treeRoot *n
188188
if len(navConfig.SubTitle) > 0 {
189189
appLink.SubTitle = navConfig.SubTitle
190190
}
191+
if navConfig.IsNew {
192+
appLink.IsNew = true
193+
}
191194
}
192195

193196
if sectionID == navtree.NavIDRoot {
@@ -323,6 +326,7 @@ func (s *ServiceImpl) readNavigationSettings() {
323326
SectionID: navtree.NavIDCfg,
324327
Text: "Advisor",
325328
SubTitle: "Keep Grafana running smoothly and securely",
329+
IsNew: true,
326330
}
327331
}
328332

pkg/services/navtree/navtreeimpl/navtree.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type NavigationAppConfig struct {
5555
Text string
5656
Icon string
5757
SubTitle string
58+
IsNew bool
5859
}
5960

6061
func ProvideService(cfg *setting.Cfg, accessControl ac.AccessControl, pluginStore pluginstore.Store, pluginSettings pluginsettings.Service, starService star.Service,

0 commit comments

Comments
 (0)