Expose reporting-enabled flag to frontend (#46753)

leeoniya/prometheus-mock-response
Jesse Weaver 3 years ago committed by GitHub
parent 4a568769e7
commit 560fc9812d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/grafana-runtime/src/config.ts
  2. 3
      pkg/api/frontendsettings.go

@ -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';

@ -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,
}

Loading…
Cancel
Save