feat: NavTree menu entry for adaptive telemetry grafana cloud apps (#109561)
* feat: NavTree menu entry for adaptive telemetry grafana cloud apps * feat: 'adaptive-telemetry' icon added
This commit is contained in:
@@ -98,6 +98,7 @@ export const availableIconsIndex = {
|
||||
'download-alt': true,
|
||||
draggabledots: true,
|
||||
drilldown: true,
|
||||
'adaptive-telemetry': true,
|
||||
edit: true,
|
||||
'ellipsis-v': true,
|
||||
enter: true,
|
||||
|
||||
@@ -41,6 +41,7 @@ const (
|
||||
NavIDDashboards = "dashboards/browse"
|
||||
NavIDExplore = "explore"
|
||||
NavIDDrilldown = "drilldown"
|
||||
NavIDAdaptiveTelemetry = "adaptive-telemetry"
|
||||
NavIDCfg = "cfg" // NavIDCfg is the id for org configuration navigation node
|
||||
NavIDAlertsAndIncidents = "alerts-and-incidents"
|
||||
NavIDTestingAndSynthetics = "testing-and-synthetics"
|
||||
|
||||
@@ -37,6 +37,8 @@ func (s *ServiceImpl) addAppLinks(treeRoot *navtree.NavTreeRoot, c *contextmodel
|
||||
return false
|
||||
}
|
||||
|
||||
enabledAccessibleAppPluginMap := make(map[string]*pluginstore.Plugin)
|
||||
|
||||
for _, plugin := range s.pluginStore.Plugins(c.Req.Context(), plugins.TypeApp) {
|
||||
if !isPluginEnabled(plugin) {
|
||||
continue
|
||||
@@ -46,11 +48,20 @@ func (s *ServiceImpl) addAppLinks(treeRoot *navtree.NavTreeRoot, c *contextmodel
|
||||
continue
|
||||
}
|
||||
|
||||
enabledAccessibleAppPluginMap[plugin.ID] = &plugin
|
||||
if appNode := s.processAppPlugin(plugin, c, treeRoot); appNode != nil {
|
||||
appLinks = append(appLinks, appNode)
|
||||
}
|
||||
}
|
||||
|
||||
if adaptiveTelemetryPlugin := enabledAccessibleAppPluginMap["grafana-adaptivetelemetry-app"]; adaptiveTelemetryPlugin != nil {
|
||||
if adaptiveTelemetrySection := treeRoot.FindById(navtree.NavIDAdaptiveTelemetry); adaptiveTelemetrySection != nil {
|
||||
// If the adaptivetelemetry app is enabled, and the adaptiveTelemetrySection exists, then update the section to point to the plugin
|
||||
adaptiveTelemetrySection.Url = s.cfg.AppSubURL + "/a/" + adaptiveTelemetryPlugin.ID
|
||||
adaptiveTelemetrySection.PluginID = adaptiveTelemetryPlugin.ID
|
||||
}
|
||||
}
|
||||
|
||||
if len(appLinks) > 0 {
|
||||
sort.SliceStable(appLinks, func(i, j int) bool {
|
||||
return appLinks[i].Text < appLinks[j].Text
|
||||
@@ -291,6 +302,19 @@ func (s *ServiceImpl) addPluginToSection(c *contextmodel.ReqContext, treeRoot *n
|
||||
Children: []*navtree.NavLink{appLink},
|
||||
Url: s.cfg.AppSubURL + "/testing-and-synthetics",
|
||||
})
|
||||
case navtree.NavIDAdaptiveTelemetry:
|
||||
treeRoot.AddSection(&navtree.NavLink{
|
||||
Text: "Adaptive Telemetry",
|
||||
Id: navtree.NavIDAdaptiveTelemetry,
|
||||
SubTitle: "Reduce noise, cut costs, and accelerate troubleshooting by intelligently ingesting only the telemetry data that matters most.",
|
||||
Icon: "adaptive-telemetry",
|
||||
SortWeight: navtree.WeightAIAndML + 1, // Place under "AI & Machine Learning"
|
||||
Children: []*navtree.NavLink{appLink},
|
||||
Url: "adaptive-telemetry",
|
||||
// Use the icon URL from the first "Adaptive Telemetry" plugin in the list (they will all be the same)
|
||||
Img: s.cfg.AppSubURL + plugin.Info.Logos.Large,
|
||||
IsNew: true,
|
||||
})
|
||||
default:
|
||||
s.log.Error("Plugin app nav id not found", "pluginId", plugin.ID, "navId", sectionID)
|
||||
}
|
||||
@@ -333,9 +357,10 @@ func (s *ServiceImpl) readNavigationSettings() {
|
||||
"grafana-slo-app": {SectionID: navtree.NavIDAlertsAndIncidents, SortWeight: 7},
|
||||
"grafana-cloud-link-app": {SectionID: navtree.NavIDCfgPlugins, SortWeight: 3},
|
||||
"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-adaptive-metrics-app": {SectionID: navtree.NavIDAdaptiveTelemetry, SortWeight: 1, Text: "Adaptive Metrics", SubTitle: "Analyzes and reduces unused metrics and cardinality to help you focus on your most valuable performance data."},
|
||||
"grafana-adaptivelogs-app": {SectionID: navtree.NavIDAdaptiveTelemetry, SortWeight: 2, Text: "Adaptive Logs", SubTitle: "Analyzes log patterns to drop repetitive lines and accelerate troubleshooting."},
|
||||
"grafana-adaptivetraces-app": {SectionID: navtree.NavIDAdaptiveTelemetry, SortWeight: 3, Text: "Adaptive Traces", SubTitle: "Analyzes and retains the most valuable traces, providing the performance insights needed to resolve issues faster."},
|
||||
"grafana-adaptiveprofiles-app": {SectionID: navtree.NavIDAdaptiveTelemetry, SortWeight: 4, Text: "Adaptive Profiles", SubTitle: "Analyzes application profiles to pinpoint the root cause of performance issues and accelerate resolution."},
|
||||
"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"},
|
||||
|
||||
@@ -187,6 +187,10 @@ export function getAppRoutes(): RouteDescriptor[] {
|
||||
path: '/testing-and-synthetics',
|
||||
component: () => <NavLandingPage navId="testing-and-synthetics" />,
|
||||
},
|
||||
{
|
||||
path: '/adaptive-telemetry',
|
||||
component: () => <NavLandingPage navId="adaptive-telemetry" />,
|
||||
},
|
||||
{
|
||||
path: '/monitoring',
|
||||
component: () => <Navigate replace to="/observability" />,
|
||||
|
||||
1
public/img/icons/unicons/adaptive-telemetry.svg
Normal file
1
public/img/icons/unicons/adaptive-telemetry.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 191.63"><g><path d="M85.12,94h-31.37c-3.24,0-5.87-2.63-5.87-5.87s2.63-5.87,5.87-5.87h31.37l.41-30.28c0-3.24,2.63-5.87,5.87-5.87s5.87,2.63,5.87,5.87v30.13c0,6.55-5.46,11.89-12.16,11.89Z"/><path d="M89.57,92.24c-1.46,0-2.93-.55-4.07-1.64L30.85,38.15c-2.33-2.24-2.41-5.95-.16-8.3,2.24-2.33,5.96-2.4,8.3-.16l54.65,52.45c2.33,2.24,2.41,5.95,.16,8.3-1.15,1.19-2.69,1.8-4.23,1.8Z"/></g><g id="Design___Resize___resize-expand"><g id="Group_179"><g id="resize-expand"><path d="M29.86,156.33H15.91c-8.77,0-15.91-6.96-15.91-15.51v-9.64c0-3.24,2.63-5.87,5.87-5.87s5.87,2.63,5.87,5.87v9.64c0,2.08,1.87,3.77,4.17,3.77h13.95c3.24,0,5.87,2.63,5.87,5.87s-2.63,5.87-5.87,5.87Z"/><path d="M5.87,31.02c-3.24,0-5.87-2.63-5.87-5.87V15.51C0,6.96,7.15,0,15.91,0h10.04c3.24,0,5.87,2.63,5.87,5.87s-2.63,5.87-5.87,5.87H15.91c-2.3,0-4.17,1.69-4.17,3.77v9.64c0,3.24-2.63,5.87-5.87,5.87Z"/><path d="M156.47,34.93c-3.24,0-5.87-2.63-5.87-5.87V15.51c0-2.08-1.87-3.77-4.17-3.77h-10.03c-3.24,0-5.87-2.63-5.87-5.87s2.63-5.87,5.87-5.87h10.03c8.77,0,15.91,6.96,15.91,15.51v13.55c0,3.24-2.63,5.87-5.87,5.87Z"/><path d="M5.87,69.57c-3.24,0-5.87-2.63-5.87-5.87v-14.45c0-3.24,2.63-5.87,5.87-5.87s5.87,2.63,5.87,5.87v14.45c0,3.24-2.63,5.87-5.87,5.87Z"/><path d="M5.87,112.95c-3.24,0-5.87-2.63-5.87-5.87v-14.45c0-3.24,2.63-5.87,5.87-5.87s5.87,2.63,5.87,5.87v14.45c0,3.24-2.63,5.87-5.87,5.87Z"/><path d="M156.47,77.4c-3.24,0-5.87-2.63-5.87-5.87v-18.37c0-3.24,2.63-5.87,5.87-5.87s5.87,2.63,5.87,5.87v18.37c0,3.24-2.63,5.87-5.87,5.87Z"/><path d="M73.94,156.33h-18.97c-3.24,0-5.87-2.63-5.87-5.87s2.63-5.87,5.87-5.87h18.97c3.24,0,5.87,2.63,5.87,5.87s-2.63,5.87-5.87,5.87Z"/><path d="M66.12,11.74h-15.06c-3.24,0-5.87-2.63-5.87-5.87s2.63-5.87,5.87-5.87h15.06c3.24,0,5.87,2.63,5.87,5.87s-2.63,5.87-5.87,5.87Z"/><path d="M111.29,11.74h-15.06c-3.24,0-5.87-2.63-5.87-5.87s2.63-5.87,5.87-5.87h15.06c3.24,0,5.87,2.63,5.87,5.87s-2.63,5.87-5.87,5.87Z"/></g></g></g><path d="M183.96,192.47H116.44c-8.85,0-16.04-7.02-16.04-15.64V112.02c0-8.62,7.19-15.63,16.04-15.63h67.52c8.85,0,16.04,7.01,16.04,15.63v64.82c0,8.62-7.19,15.64-16.04,15.64ZM116.44,108.14c-2.37,0-4.3,1.74-4.3,3.88v64.82c0,2.15,1.93,3.9,4.3,3.9h67.52c2.37,0,4.3-1.75,4.3-3.9V112.02c0-2.15-1.93-3.88-4.3-3.88H116.44Z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
Reference in New Issue
Block a user