Feature Highlights: move setting to a feature toggle (#44780)

* Add toggle

* Use the toggle

* Cleanup
This commit is contained in:
Alex Khomenko
2022-02-03 13:53:23 +02:00
committed by GitHub
parent c23bc1e7b7
commit a79c048344
8 changed files with 16 additions and 15 deletions
-3
View File
@@ -273,9 +273,6 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"enabled": hs.Cfg.SectionWithEnvOverrides("recorded_queries").Key("enabled").MustBool(true),
},
"unifiedAlertingEnabled": hs.Cfg.UnifiedAlerting.Enabled,
"featureHighlights": map[string]bool{
"enabled": hs.SettingsProvider.Section("feature_highlights").KeyValue("enabled").MustBool(false),
},
}
if hs.Cfg.GeomapDefaultBaseLayerConfig != nil {
+5
View File
@@ -110,5 +110,10 @@ var (
State: FeatureStateAlpha,
RequiresDevMode: true,
},
{
Name: "featureHighlights",
Description: "Highlight Enterprise features",
State: FeatureStateStable,
},
}
)
+4
View File
@@ -82,4 +82,8 @@ const (
// FlagValidatedQueries
// only execute the query saved in a panel
FlagValidatedQueries = "validatedQueries"
// FlagFeatureHighlights
// Highlight Enterprise features
FlagFeatureHighlights = "featureHighlights"
)