feat: (Navlinks) - Add Adaptive Traces to Cost mgmt navlinks (#97981)

This commit is contained in:
Liza Detrick 2024-12-18 09:05:18 -06:00 committed by GitHub
parent 26c323b5a6
commit 67a85fc358
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -165,6 +165,7 @@ func (root *NavTreeRoot) ApplyCostManagementIA() {
var costManagementApp *NavLink
var adaptiveMetricsApp *NavLink
var adaptiveLogsApp *NavLink
var adaptiveTracesApp *NavLink
var attributionsApp *NavLink
var logVolumeExplorerApp *NavLink
@ -178,6 +179,8 @@ func (root *NavTreeRoot) ApplyCostManagementIA() {
adaptiveMetricsApp = element
case "plugin-page-grafana-adaptivelogs-app":
adaptiveLogsApp = element
case "plugin-page-grafana-adaptivetraces-app":
adaptiveTracesApp = element
case "plugin-page-grafana-attributions-app":
attributionsApp = element
case "plugin-page-grafana-logvolumeexplorer-app":
@ -207,6 +210,13 @@ func (root *NavTreeRoot) ApplyCostManagementIA() {
costManagementLogsNode.Children = append(costManagementLogsNode.Children, logVolumeExplorerApp)
}
}
costManagementTracesNode := FindByURL(costManagementApp.Children, "/a/grafana-costmanagementui-app/traces")
if costManagementTracesNode != nil {
if adaptiveTracesApp != nil {
costManagementTracesNode.Children = append(costManagementTracesNode.Children, adaptiveTracesApp)
}
}
adminNodeLinks = append(adminNodeLinks, costManagementApp)
}
orgAdminNode.Children = adminNodeLinks

View File

@ -300,6 +300,7 @@ func (s *ServiceImpl) readNavigationSettings() {
"grafana-costmanagementui-app": {SectionID: navtree.NavIDCfg, Text: "Cost management"},
"grafana-adaptive-metrics-app": {SectionID: navtree.NavIDCfg, Text: "Adaptive Metrics"},
"grafana-adaptivelogs-app": {SectionID: navtree.NavIDCfg, Text: "Adaptive Logs"},
"grafana-adaptivetraces-app": {SectionID: navtree.NavIDCfg, Text: "Adaptive Traces"},
"grafana-attributions-app": {SectionID: navtree.NavIDCfg, Text: "Attributions"},
"grafana-logvolumeexplorer-app": {SectionID: navtree.NavIDCfg, Text: "Log Volume Explorer"},
"grafana-easystart-app": {SectionID: navtree.NavIDRoot, SortWeight: navtree.WeightApps + 1, Text: "Connections", Icon: "adjust-circle"},