Navigation: Allow apps to show IsNew badge in the navigation menu (#103608)

pull/101750/head^2
Andres Martinez Gotor 1 month ago committed by GitHub
parent a7197d02ad
commit 890484ff6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      pkg/services/navtree/navtreeimpl/applinks.go
  2. 1
      pkg/services/navtree/navtreeimpl/navtree.go

@ -188,6 +188,9 @@ func (s *ServiceImpl) addPluginToSection(c *contextmodel.ReqContext, treeRoot *n
if len(navConfig.SubTitle) > 0 {
appLink.SubTitle = navConfig.SubTitle
}
if navConfig.IsNew {
appLink.IsNew = true
}
}
if sectionID == navtree.NavIDRoot {
@ -323,6 +326,7 @@ func (s *ServiceImpl) readNavigationSettings() {
SectionID: navtree.NavIDCfg,
Text: "Advisor",
SubTitle: "Keep Grafana running smoothly and securely",
IsNew: true,
}
}

@ -55,6 +55,7 @@ type NavigationAppConfig struct {
Text string
Icon string
SubTitle string
IsNew bool
}
func ProvideService(cfg *setting.Cfg, accessControl ac.AccessControl, pluginStore pluginstore.Store, pluginSettings pluginsettings.Service, starService star.Service,

Loading…
Cancel
Save