From 7bb4f5cd9baff81b354e4bb65fd4b6141e3488f6 Mon Sep 17 00:00:00 2001 From: Shirley <4163034+fridgepoet@users.noreply.github.com> Date: Fri, 29 Apr 2022 11:43:04 +0200 Subject: [PATCH] CloudWatch: Add dynamic labels feature toggle (#48498) --- conf/defaults.ini | 3 +++ packages/grafana-data/src/types/featureToggles.gen.ts | 1 + pkg/services/featuremgmt/registry.go | 5 +++++ pkg/services/featuremgmt/toggles_gen.go | 4 ++++ 4 files changed, 13 insertions(+) diff --git a/conf/defaults.ini b/conf/defaults.ini index 742cf259ec7..84819d83a75 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -1146,6 +1146,9 @@ explore2Dashboard = true # Experimental Command Palette commandPalette = true +# Use dynamic labels in CloudWatch datasource +cloudWatchDynamicLabels = false + # feature1 = true # feature2 = false diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 61741409adc..dc8bb1275af 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -58,4 +58,5 @@ export interface FeatureToggles { persistNotifications?: boolean; commandPalette?: boolean; savedItems?: boolean; + cloudWatchDynamicLabels?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 8458c57093b..dc367303b85 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -237,5 +237,10 @@ var ( Description: "Enable Saved Items in the navbar.", State: FeatureStateAlpha, }, + { + Name: "cloudWatchDynamicLabels", + Description: "Use dynamic labels instead of alias patterns in CloudWatch datasource", + State: FeatureStateStable, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 18ebac24d06..a0b1780dbe6 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -174,4 +174,8 @@ const ( // FlagSavedItems // Enable Saved Items in the navbar. FlagSavedItems = "savedItems" + + // FlagCloudWatchDynamicLabels + // Use dynamic labels instead of alias patterns in CloudWatch datasource + FlagCloudWatchDynamicLabels = "cloudWatchDynamicLabels" )