From fe8e4563bd196453b7e35f55e335f844d0047dfe Mon Sep 17 00:00:00 2001 From: Javier Ruiz Date: Wed, 12 Mar 2025 16:38:22 +0100 Subject: [PATCH] [getTagValues] Ensure we're not using suggestions when no scopes are present (#102008) Ensure we're not using suggestions when no scopes are present --- packages/grafana-prometheus/src/datasource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-prometheus/src/datasource.ts b/packages/grafana-prometheus/src/datasource.ts index fe1607693b7..44e93ebb7d1 100644 --- a/packages/grafana-prometheus/src/datasource.ts +++ b/packages/grafana-prometheus/src/datasource.ts @@ -691,7 +691,7 @@ export class PrometheusDatasource // By implementing getTagKeys and getTagValues we add ad-hoc filters functionality async getTagValues(options: DataSourceGetTagValuesOptions) { const requestId = `[${this.uid}][${options.key}]`; - if (config.featureToggles.promQLScope) { + if (config.featureToggles.promQLScope && (options?.scopes?.length ?? 0) > 0) { return ( await this.languageProvider.fetchSuggestions( options.timeRange,