mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Navigation: Remove monitoring texts for items under Monitoring section (#58522)
* rename Synthetic monitoring with Synthetics * improved text override
This commit is contained in:
parent
f4531b4ee1
commit
a71f74220a
@ -176,6 +176,10 @@ func (s *ServiceImpl) processAppPlugin(plugin plugins.PluginDTO, c *models.ReqCo
|
||||
if navConfig, hasOverride := s.navigationAppConfig[plugin.ID]; hasOverride {
|
||||
appLink.SortWeight = navConfig.SortWeight
|
||||
sectionID = navConfig.SectionID
|
||||
|
||||
if len(navConfig.Text) > 0 {
|
||||
appLink.Text = navConfig.Text
|
||||
}
|
||||
}
|
||||
|
||||
if navNode := treeRoot.FindById(sectionID); navNode != nil {
|
||||
@ -228,10 +232,10 @@ func (s *ServiceImpl) processAppPlugin(plugin plugins.PluginDTO, c *models.ReqCo
|
||||
|
||||
func (s *ServiceImpl) readNavigationSettings() {
|
||||
s.navigationAppConfig = map[string]NavigationAppConfig{
|
||||
"grafana-k8s-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 1},
|
||||
"grafana-synthetic-monitoring-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 2},
|
||||
"grafana-oncall-app": {SectionID: navtree.NavIDAlertsAndIncidents, SortWeight: 1},
|
||||
"grafana-incident-app": {SectionID: navtree.NavIDAlertsAndIncidents, SortWeight: 2},
|
||||
"grafana-k8s-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 1, Text: "Kubernetes"},
|
||||
"grafana-synthetic-monitoring-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 2, Text: "Synthetics"},
|
||||
"grafana-oncall-app": {SectionID: navtree.NavIDAlertsAndIncidents, SortWeight: 1, Text: "OnCall"},
|
||||
"grafana-incident-app": {SectionID: navtree.NavIDAlertsAndIncidents, SortWeight: 2, Text: "Incident"},
|
||||
"grafana-ml-app": {SectionID: navtree.NavIDAlertsAndIncidents, SortWeight: 3},
|
||||
"grafana-cloud-link-app": {SectionID: navtree.NavIDCfg},
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ type ServiceImpl struct {
|
||||
type NavigationAppConfig struct {
|
||||
SectionID string
|
||||
SortWeight int64
|
||||
Text string
|
||||
}
|
||||
|
||||
func ProvideService(cfg *setting.Cfg, accessControl ac.AccessControl, pluginStore plugins.Store, pluginSettings pluginsettings.Service, starService star.Service, features *featuremgmt.FeatureManager, dashboardService dashboards.DashboardService, accesscontrolService ac.Service, kvStore kvstore.KVStore, apiKeyService apikey.Service, queryLibraryService querylibrary.HTTPService) navtree.Service {
|
||||
|
Loading…
Reference in New Issue
Block a user