From 8f035ba648ce7ce1f57a0b7a067d9fb6961fd14b Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Wed, 6 Apr 2022 03:39:49 -0600 Subject: [PATCH] Expose reporting-enabled flag to frontend (#46753) --- packages/grafana-runtime/src/config.ts | 3 +++ pkg/api/frontendsettings.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/grafana-runtime/src/config.ts b/packages/grafana-runtime/src/config.ts index ec4825f27c1..2541a8c92d0 100644 --- a/packages/grafana-runtime/src/config.ts +++ b/packages/grafana-runtime/src/config.ts @@ -98,6 +98,9 @@ export class GrafanaBootConfig implements GrafanaConfig { featureHighlights = { enabled: false, }; + reporting = { + enabled: true, + }; constructor(options: GrafanaBootConfig) { const mode = options.bootData.user.lightTheme ? 'light' : 'dark'; diff --git a/pkg/api/frontendsettings.go b/pkg/api/frontendsettings.go index 43d38af0b77..af0a3f0f6c8 100644 --- a/pkg/api/frontendsettings.go +++ b/pkg/api/frontendsettings.go @@ -272,6 +272,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, }