Chore: Allow for an applink to set a subtitle (#103205)
This commit is contained in:
@@ -185,6 +185,9 @@ func (s *ServiceImpl) addPluginToSection(c *contextmodel.ReqContext, treeRoot *n
|
||||
if len(navConfig.Icon) > 0 {
|
||||
appLink.Icon = navConfig.Icon
|
||||
}
|
||||
if len(navConfig.SubTitle) > 0 {
|
||||
appLink.SubTitle = navConfig.SubTitle
|
||||
}
|
||||
}
|
||||
|
||||
if sectionID == navtree.NavIDRoot {
|
||||
@@ -316,7 +319,11 @@ func (s *ServiceImpl) readNavigationSettings() {
|
||||
}
|
||||
|
||||
if s.features.IsEnabledGlobally(featuremgmt.FlagGrafanaAdvisor) {
|
||||
s.navigationAppConfig["grafana-advisor-app"] = NavigationAppConfig{SectionID: navtree.NavIDCfg, Text: "Advisor"}
|
||||
s.navigationAppConfig["grafana-advisor-app"] = NavigationAppConfig{
|
||||
SectionID: navtree.NavIDCfg,
|
||||
Text: "Advisor",
|
||||
SubTitle: "Keep Grafana running smoothly and securely",
|
||||
}
|
||||
}
|
||||
|
||||
s.navigationAppPathConfig = map[string]NavigationAppConfig{
|
||||
|
||||
@@ -54,6 +54,7 @@ type NavigationAppConfig struct {
|
||||
SortWeight int64
|
||||
Text string
|
||||
Icon string
|
||||
SubTitle string
|
||||
}
|
||||
|
||||
func ProvideService(cfg *setting.Cfg, accessControl ac.AccessControl, pluginStore pluginstore.Store, pluginSettings pluginsettings.Service, starService star.Service,
|
||||
|
||||
Reference in New Issue
Block a user