Scopes: Fetch ScopeNavigation and display them (#102385)

* Initial API client for ScopesNavigation

* Display scopes navigation items and group them

* Remove refactored component

* Fix link highlighting

* Underline on focus

* Set icons based un URL path

* Remove explicit icon names

* Add links to copy

* Map dashboardbinding to scopeNavigation in folder generation

* Consolidate dashboardbindings and scopenavigations to a single way of handling

* Let fetchDashboards handle all fetching

* Move endpoint types to core

* Remove comments

* Fix import

* Rename name to id

* Update translation

* Add feature toggle

* Fix tests

* Fix go.mod for some reason

---------

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
This commit is contained in:
Tobias Skarhed
2025-03-31 17:20:00 +02:00
committed by GitHub
co-authored by Andrej Ocenas
parent 483c6ac70d
commit c321afdeb7
16 changed files with 358 additions and 230 deletions
+8
View File
@@ -1708,6 +1708,14 @@ var (
FrontendOnly: true,
HideFromDocs: true,
},
{
Name: "useScopesNavigationEndpoint",
Description: "Use the scopes navigation endpoint instead of the dashboardbindings endpoint",
Stage: FeatureStageExperimental,
Owner: grafanaFrontendPlatformSquad,
FrontendOnly: true,
HideFromDocs: true,
},
{
Name: "alertingRuleVersionHistoryRestore",
Description: "Enables the alert rule version history restore feature",
+1
View File
@@ -226,6 +226,7 @@ newLogsPanel,experimental,@grafana/observability-logs,false,false,true
grafanaconThemes,experimental,@grafana/grafana-frontend-platform,false,true,false
pluginsCDNSyncLoader,experimental,@grafana/plugins-platform-backend,false,false,false
alertingJiraIntegration,experimental,@grafana/alerting-squad,false,false,true
useScopesNavigationEndpoint,experimental,@grafana/grafana-frontend-platform,false,false,true
alertingRuleVersionHistoryRestore,GA,@grafana/alerting-squad,false,false,true
newShareReportDrawer,experimental,@grafana/sharing-squad,false,false,false
rendererDisableAppPluginsPreload,experimental,@grafana/sharing-squad,false,false,true
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
226 grafanaconThemes experimental @grafana/grafana-frontend-platform false true false
227 pluginsCDNSyncLoader experimental @grafana/plugins-platform-backend false false false
228 alertingJiraIntegration experimental @grafana/alerting-squad false false true
229 useScopesNavigationEndpoint experimental @grafana/grafana-frontend-platform false false true
230 alertingRuleVersionHistoryRestore GA @grafana/alerting-squad false false true
231 newShareReportDrawer experimental @grafana/sharing-squad false false false
232 rendererDisableAppPluginsPreload experimental @grafana/sharing-squad false false true
+4
View File
@@ -915,6 +915,10 @@ const (
// Enables the new Jira integration for contact points in cloud alert managers.
FlagAlertingJiraIntegration = "alertingJiraIntegration"
// FlagUseScopesNavigationEndpoint
// Use the scopes navigation endpoint instead of the dashboardbindings endpoint
FlagUseScopesNavigationEndpoint = "useScopesNavigationEndpoint"
// FlagAlertingRuleVersionHistoryRestore
// Enables the alert rule version history restore feature
FlagAlertingRuleVersionHistoryRestore = "alertingRuleVersionHistoryRestore"
+14
View File
@@ -4390,6 +4390,20 @@
"hideFromDocs": true
}
},
{
"metadata": {
"name": "useScopesNavigationEndpoint",
"resourceVersion": "1743087365203",
"creationTimestamp": "2025-03-27T14:56:05Z"
},
"spec": {
"description": "Use the scopes navigation endpoint instead of the dashboardbindings endpoint",
"stage": "experimental",
"codeowner": "@grafana/grafana-frontend-platform",
"frontend": true,
"hideFromDocs": true
}
},
{
"metadata": {
"name": "useSeessionStorageForRedirection",