Expose reporting-enabled flag to frontend (#46753)

This commit is contained in:
Jesse Weaver 2022-03-22 14:30:45 -06:00 committed by GitHub
parent 4a568769e7
commit 560fc9812d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -107,6 +107,9 @@ export class GrafanaBootConfig implements GrafanaConfig {
featureHighlights = {
enabled: false,
};
reporting = {
enabled: true,
};
constructor(options: GrafanaBootConfig) {
const mode = options.bootData.user.lightTheme ? 'light' : 'dark';

View File

@ -164,6 +164,9 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"recordedQueries": map[string]bool{
"enabled": hs.Cfg.SectionWithEnvOverrides("recorded_queries").Key("enabled").MustBool(true),
},
"reporting": map[string]bool{
"enabled": hs.Cfg.SectionWithEnvOverrides("reporting").Key("enabled").MustBool(true),
},
"unifiedAlertingEnabled": hs.Cfg.UnifiedAlerting.Enabled,
}