* update monitoring -> observability
* update backend test
(cherry picked from commit 1f193f1bad)
This commit is contained in:
@@ -217,9 +217,9 @@ func (s *ServiceImpl) addPluginToSection(c *contextmodel.ReqContext, treeRoot *n
|
||||
})
|
||||
case navtree.NavIDMonitoring:
|
||||
treeRoot.AddSection(&navtree.NavLink{
|
||||
Text: "Monitoring",
|
||||
Text: "Observability",
|
||||
Id: navtree.NavIDMonitoring,
|
||||
SubTitle: "Monitoring and infrastructure apps",
|
||||
SubTitle: "Observability and infrastructure apps",
|
||||
Icon: "heart-rate",
|
||||
Section: navtree.NavSectionCore,
|
||||
SortWeight: navtree.WeightMonitoring,
|
||||
@@ -270,6 +270,7 @@ func (s *ServiceImpl) readNavigationSettings() {
|
||||
s.navigationAppConfig = map[string]NavigationAppConfig{
|
||||
"grafana-k8s-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 1, Text: "Kubernetes"},
|
||||
"grafana-synthetic-monitoring-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 2, Text: "Synthetics"},
|
||||
"grafana-kowalski-app": {SectionID: navtree.NavIDMonitoring, SortWeight: 3, Text: "Frontend"},
|
||||
"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, Text: "Machine Learning"},
|
||||
@@ -297,7 +298,16 @@ func (s *ServiceImpl) readNavigationSettings() {
|
||||
}
|
||||
}
|
||||
|
||||
s.navigationAppConfig[pluginId] = *appCfg
|
||||
// Only apply the new values, don't completely overwrite the entry if it exists
|
||||
if entry, ok := s.navigationAppConfig[pluginId]; ok {
|
||||
entry.SectionID = appCfg.SectionID
|
||||
if appCfg.SortWeight != 0 {
|
||||
entry.SortWeight = appCfg.SortWeight
|
||||
}
|
||||
s.navigationAppConfig[pluginId] = entry
|
||||
} else {
|
||||
s.navigationAppConfig[pluginId] = *appCfg
|
||||
}
|
||||
}
|
||||
|
||||
for _, key := range appStandalonePages.Keys() {
|
||||
|
||||
@@ -206,7 +206,7 @@ func TestAddAppLinks(t *testing.T) {
|
||||
require.Equal(t, "plugin-page-test-app3", appsNode.Children[1].Id)
|
||||
})
|
||||
|
||||
t.Run("Should only add a 'Monitoring' section if a plugin exists that wants to live there", func(t *testing.T) {
|
||||
t.Run("Should only add an 'Observability' section if a plugin exists that wants to live there", func(t *testing.T) {
|
||||
service.features = featuremgmt.WithFeatures(featuremgmt.FlagTopnav)
|
||||
service.navigationAppConfig = map[string]NavigationAppConfig{}
|
||||
|
||||
@@ -393,7 +393,7 @@ func TestReadingNavigationSettings(t *testing.T) {
|
||||
require.Equal(t, "dashboards", service.navigationAppConfig["grafana-k8s-app"].SectionID)
|
||||
require.Equal(t, "admin", service.navigationAppConfig["other-app"].SectionID)
|
||||
|
||||
require.Equal(t, int64(0), service.navigationAppConfig["grafana-k8s-app"].SortWeight)
|
||||
require.Equal(t, int64(1), service.navigationAppConfig["grafana-k8s-app"].SortWeight)
|
||||
require.Equal(t, int64(12), service.navigationAppConfig["other-app"].SortWeight)
|
||||
|
||||
require.Equal(t, "admin", service.navigationAppPathConfig["/a/grafana-k8s-app/foo"].SectionID)
|
||||
|
||||
@@ -110,7 +110,7 @@ export function getNavTitle(navId: string | undefined) {
|
||||
case 'upgrading':
|
||||
return t('nav.upgrading.title', 'Stats and license');
|
||||
case 'monitoring':
|
||||
return t('nav.monitoring.title', 'Monitoring');
|
||||
return t('nav.monitoring.title', 'Observability');
|
||||
case 'apps':
|
||||
return t('nav.apps.title', 'Apps');
|
||||
case 'alerts-and-incidents':
|
||||
|
||||
@@ -540,7 +540,7 @@ export const navIndex: NavIndex = {
|
||||
},
|
||||
monitoring: {
|
||||
id: 'monitoring',
|
||||
text: 'Monitoring',
|
||||
text: 'Observability',
|
||||
section: NavSection.Core,
|
||||
subTitle: 'Monitoring and infrastructure apps',
|
||||
icon: 'heart-rate',
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
},
|
||||
"monitoring": {
|
||||
"subtitle": "Monitoring and infrastructure apps",
|
||||
"title": "Monitoring"
|
||||
"title": "Observability"
|
||||
},
|
||||
"new": {
|
||||
"title": "New"
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
},
|
||||
"monitoring": {
|
||||
"subtitle": "Mőʼnįŧőřįʼnģ äʼnđ įʼnƒřäşŧřūčŧūřę äppş",
|
||||
"title": "Mőʼnįŧőřįʼnģ"
|
||||
"title": "Øþşęřväþįľįŧy"
|
||||
},
|
||||
"new": {
|
||||
"title": "Ńęŵ"
|
||||
|
||||
Reference in New Issue
Block a user