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:
co-authored by
Joan López de la Franca Beltran
Joan López de la Franca Beltran
parent
e75edc810d
commit
3b4a4be3c6
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user