Alerting: Check recording rules are enabled as well as feature toggle (#102633)
* Add `recordingRulesEnabled` to grafanaBootData * Check for recording rules being enabled, as well as feature toggle * Remove unnecessary config line * Move recording rules check to featureToggles file * Update NoRulesCTA.tsx
This commit is contained in:
@@ -97,6 +97,7 @@ type FrontendSettingsUnifiedAlertingDTO struct {
|
||||
MinInterval string `json:"minInterval"`
|
||||
AlertStateHistoryBackend string `json:"alertStateHistoryBackend,omitempty"`
|
||||
AlertStateHistoryPrimary string `json:"alertStateHistoryPrimary,omitempty"`
|
||||
RecordingRulesEnabled bool `json:"recordingRulesEnabled"`
|
||||
}
|
||||
|
||||
// Enterprise-only
|
||||
|
||||
@@ -337,6 +337,8 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
frontendSettings.UnifiedAlerting.AlertStateHistoryPrimary = hs.Cfg.UnifiedAlerting.StateHistory.MultiPrimary
|
||||
}
|
||||
|
||||
frontendSettings.UnifiedAlerting.RecordingRulesEnabled = hs.Cfg.UnifiedAlerting.RecordingRules.Enabled
|
||||
|
||||
if hs.Cfg.UnifiedAlerting.Enabled != nil {
|
||||
frontendSettings.UnifiedAlertingEnabled = *hs.Cfg.UnifiedAlerting.Enabled
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user