From a17340ea8b26acda0615c96143c80b0e129db93a Mon Sep 17 00:00:00 2001 From: Liza Detrick <114438185+L2D2Grafana@users.noreply.github.com> Date: Wed, 15 May 2024 14:26:18 -0700 Subject: [PATCH] Applinks: Adds grafana-attributions-app to Cost Management nav (#87765) * Applinks: add attributions under cost management -> metrics --- pkg/services/navtree/models.go | 6 ++++++ pkg/services/navtree/navtreeimpl/applinks.go | 1 + 2 files changed, 7 insertions(+) diff --git a/pkg/services/navtree/models.go b/pkg/services/navtree/models.go index 76d718f4c10..7b6c760be95 100644 --- a/pkg/services/navtree/models.go +++ b/pkg/services/navtree/models.go @@ -223,6 +223,12 @@ func (root *NavTreeRoot) ApplyAdminIA() { costManagementMetricsNode.Children = append(costManagementMetricsNode.Children, adaptiveMetricsNode) } + attributionsNode := root.FindById("plugin-page-grafana-attributions-app") + + if costManagementMetricsNode != nil && attributionsNode != nil { + costManagementMetricsNode.Children = append(costManagementMetricsNode.Children, attributionsNode) + } + costManagementLogsNode := root.FindByURL("/a/grafana-costmanagementui-app/logs") logVolumeExplorerNode := root.FindById("plugin-page-grafana-logvolumeexplorer-app") diff --git a/pkg/services/navtree/navtreeimpl/applinks.go b/pkg/services/navtree/navtreeimpl/applinks.go index 8ac14a765fb..efd4918071d 100644 --- a/pkg/services/navtree/navtreeimpl/applinks.go +++ b/pkg/services/navtree/navtreeimpl/applinks.go @@ -298,6 +298,7 @@ func (s *ServiceImpl) readNavigationSettings() { "grafana-cloud-link-app": {SectionID: navtree.NavIDCfg}, "grafana-costmanagementui-app": {SectionID: navtree.NavIDCfg, Text: "Cost management"}, "grafana-adaptive-metrics-app": {SectionID: navtree.NavIDCfg, Text: "Adaptive Metrics"}, + "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"}, "k6-app": {SectionID: navtree.NavIDTestingAndSynthetics, SortWeight: 1, Text: "Performance"},