Scopes: Get parent nodes for command palette search results (#111820)

* Add feature flag for multiple scopes endpoint usage

* Add method to API client for fetching multiple ScopeNodes at the same time

* Add parent title to tree

* Get nodes from cache too

* Update test with new functionality

* Update test

* Fix linting issue

* Remove unapplied scope parents
This commit is contained in:
Tobias Skarhed
2025-09-30 21:46:06 +02:00
committed by GitHub
parent 7055ba9140
commit 5639ecf711
11 changed files with 122 additions and 11 deletions
+10
View File
@@ -806,6 +806,16 @@ var (
HideFromDocs: true,
HideFromAdminPage: true,
},
{
Name: "useMultipleScopeNodesEndpoint",
Description: "Makes the frontend use the 'names' param for fetching multiple scope nodes at once",
Stage: FeatureStageExperimental,
Owner: grafanaOperatorExperienceSquad,
Expression: "false",
FrontendOnly: true,
HideFromDocs: true,
HideFromAdminPage: true,
},
{
Name: "promQLScope",
Description: "In-development feature that will allow injection of labels into prometheus queries.",
+1
View File
@@ -106,6 +106,7 @@ alertingSaveStatePeriodic,privatePreview,@grafana/alerting-squad,false,false,fal
alertingSaveStateCompressed,preview,@grafana/alerting-squad,false,false,false
scopeApi,experimental,@grafana/grafana-app-platform-squad,false,false,false
useScopeSingleNodeEndpoint,experimental,@grafana/grafana-operator-experience-squad,false,false,true
useMultipleScopeNodesEndpoint,experimental,@grafana/grafana-operator-experience-squad,false,false,true
promQLScope,GA,@grafana/oss-big-tent,false,false,false
logQLScope,privatePreview,@grafana/observability-logs,false,false,false
sqlExpressions,preview,@grafana/grafana-datasources-core-services,false,false,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
106 alertingSaveStateCompressed preview @grafana/alerting-squad false false false
107 scopeApi experimental @grafana/grafana-app-platform-squad false false false
108 useScopeSingleNodeEndpoint experimental @grafana/grafana-operator-experience-squad false false true
109 useMultipleScopeNodesEndpoint experimental @grafana/grafana-operator-experience-squad false false true
110 promQLScope GA @grafana/oss-big-tent false false false
111 logQLScope privatePreview @grafana/observability-logs false false false
112 sqlExpressions preview @grafana/grafana-datasources-core-services false false false
+4
View File
@@ -435,6 +435,10 @@ const (
// Use the single node endpoint for the scope api. This is used to fetch the scope parent node.
FlagUseScopeSingleNodeEndpoint = "useScopeSingleNodeEndpoint"
// FlagUseMultipleScopeNodesEndpoint
// Makes the frontend use the 'names' param for fetching multiple scope nodes at once
FlagUseMultipleScopeNodesEndpoint = "useMultipleScopeNodesEndpoint"
// FlagPromQLScope
// In-development feature that will allow injection of labels into prometheus queries.
FlagPromQLScope = "promQLScope"
+16
View File
@@ -3845,6 +3845,22 @@
"frontend": true
}
},
{
"metadata": {
"name": "useMultipleScopeNodesEndpoint",
"resourceVersion": "1759237515008",
"creationTimestamp": "2025-09-30T13:05:15Z"
},
"spec": {
"description": "Makes the frontend use the 'names' param for fetching multiple scope nodes at once",
"stage": "experimental",
"codeowner": "@grafana/grafana-operator-experience-squad",
"frontend": true,
"hideFromAdminPage": true,
"hideFromDocs": true,
"expression": "false"
}
},
{
"metadata": {
"name": "useScopeSingleNodeEndpoint",