UsageInsights: Disable frontend features when backend is disabled (#77772)
* UsageInsights: Disable frontend features when backend is disabled * Disable DS insights * Update doc * fix linter issue * Update docs/sources/setup-grafana/configure-grafana/_index.md Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com> --------- Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
This commit is contained in:
co-authored by
Christopher Moyer
parent
ba51c371ec
commit
bb12fe7d82
@@ -62,6 +62,10 @@ type FrontendSettingsReportingDTO struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
type FrontendSettingsAnalyticsDTO struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
type FrontendSettingsUnifiedAlertingDTO struct {
|
||||
MinInterval string `json:"minInterval"`
|
||||
AlertStateHistoryBackend string `json:"alertStateHistoryBackend,omitempty"`
|
||||
@@ -209,6 +213,7 @@ type FrontendSettingsDTO struct {
|
||||
Caching FrontendSettingsCachingDTO `json:"caching"`
|
||||
RecordedQueries FrontendSettingsRecordedQueriesDTO `json:"recordedQueries"`
|
||||
Reporting FrontendSettingsReportingDTO `json:"reporting"`
|
||||
Analytics FrontendSettingsAnalyticsDTO `json:"analytics"`
|
||||
UnifiedAlertingEnabled bool `json:"unifiedAlertingEnabled"`
|
||||
UnifiedAlerting FrontendSettingsUnifiedAlertingDTO `json:"unifiedAlerting"`
|
||||
Oauth map[string]any `json:"oauth"`
|
||||
|
||||
@@ -223,6 +223,9 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
Reporting: dtos.FrontendSettingsReportingDTO{
|
||||
Enabled: hs.Cfg.SectionWithEnvOverrides("reporting").Key("enabled").MustBool(true),
|
||||
},
|
||||
Analytics: dtos.FrontendSettingsAnalyticsDTO{
|
||||
Enabled: hs.Cfg.SectionWithEnvOverrides("analytics").Key("enabled").MustBool(true),
|
||||
},
|
||||
|
||||
UnifiedAlerting: dtos.FrontendSettingsUnifiedAlertingDTO{
|
||||
MinInterval: hs.Cfg.UnifiedAlerting.MinInterval.String(),
|
||||
|
||||
Reference in New Issue
Block a user