mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Feature highlights: add setting toggle (#43394)
* Feature highlights: add toggle setting * Settings: Use provider for 'feature_highlights' section * Fix frontendsettings API tests * Document the toggle Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com> Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
This commit is contained in:
parent
e75edc810d
commit
3b4a4be3c6
@ -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 =
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user