Navigation: Allow apps to show IsNew badge in the navigation menu (#103608)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user