diff --git a/conf/defaults.ini b/conf/defaults.ini index 91b39b47808..43196b6a68d 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -1076,10 +1076,10 @@ grpc_port = license_path = [feature_toggles] -# there are currently two ways to enable feature toggles in the `grafana.ini`. -# you can either pass an array of feature you want to enable to the `enable` field or +# there are currently two ways to enable feature toggles in the `grafana.ini`. +# you can either pass an array of feature you want to enable to the `enable` field or # configure each toggle by setting the name of the toggle to true/false. Toggles set to true/false -# will take presidence over toggles in the `enable` list. +# will take precedence over toggles in the `enable` list. # enable = feature1,feature2 enable = diff --git a/docs/sources/enterprise/enterprise-configuration.md b/docs/sources/enterprise/enterprise-configuration.md index 7790be3f726..47936b0fcb5 100644 --- a/docs/sources/enterprise/enterprise-configuration.md +++ b/docs/sources/enterprise/enterprise-configuration.md @@ -495,3 +495,9 @@ The org id of the datasource where the query data will be written. If all `default_remote_write_*` properties are set, this information will be populated at startup. If a remote write target has already been configured, nothing will happen. + +## [feature_highlights] + +### enabled + +Whether the feature highlights feature is enabled diff --git a/pkg/api/frontendsettings.go b/pkg/api/frontendsettings.go index d21a5f8bf33..466bcada691 100644 --- a/pkg/api/frontendsettings.go +++ b/pkg/api/frontendsettings.go @@ -283,6 +283,9 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i "enabled": hs.Cfg.SectionWithEnvOverrides("recorded_queries").Key("enabled").MustBool(false), }, "unifiedAlertingEnabled": hs.Cfg.UnifiedAlerting.Enabled, + "featureHighlights": map[string]bool{ + "enabled": hs.SettingsProvider.Section("feature_highlights").KeyValue("enabled").MustBool(false), + }, } if hs.Cfg.GeomapDefaultBaseLayerConfig != nil { diff --git a/pkg/api/frontendsettings_test.go b/pkg/api/frontendsettings_test.go index c2ffca308a5..f873f8ce1b5 100644 --- a/pkg/api/frontendsettings_test.go +++ b/pkg/api/frontendsettings_test.go @@ -44,10 +44,11 @@ func setupTestEnvironment(t *testing.T, cfg *setting.Cfg) (*web.Mux, *HTTPServer Cfg: cfg, RendererPluginManager: &fakeRendererManager{}, }, - SQLStore: sqlStore, - pluginStore: &fakePluginStore{}, - updateChecker: &updatechecker.Service{}, - AccessControl: accesscontrolmock.New().WithDisabled(), + SQLStore: sqlStore, + SettingsProvider: setting.ProvideProvider(cfg), + pluginStore: &fakePluginStore{}, + updateChecker: &updatechecker.Service{}, + AccessControl: accesscontrolmock.New().WithDisabled(), } m := web.New()