mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 19:49:33 +08:00
Alerting: Disable dash alerting if NG enabled (#33794)
This commit is contained in:
@ -28,6 +28,7 @@ type AlertEngine struct {
|
|||||||
Bus bus.Bus `inject:""`
|
Bus bus.Bus `inject:""`
|
||||||
RequestValidator models.PluginRequestValidator `inject:""`
|
RequestValidator models.PluginRequestValidator `inject:""`
|
||||||
DataService plugins.DataRequestHandler `inject:""`
|
DataService plugins.DataRequestHandler `inject:""`
|
||||||
|
Cfg *setting.Cfg `inject:""`
|
||||||
|
|
||||||
execQueue chan *Job
|
execQueue chan *Job
|
||||||
ticker *Ticker
|
ticker *Ticker
|
||||||
@ -44,7 +45,7 @@ func init() {
|
|||||||
|
|
||||||
// IsDisabled returns true if the alerting service is disable for this instance.
|
// IsDisabled returns true if the alerting service is disable for this instance.
|
||||||
func (e *AlertEngine) IsDisabled() bool {
|
func (e *AlertEngine) IsDisabled() bool {
|
||||||
return !setting.AlertingEnabled || !setting.ExecuteAlerts
|
return !setting.AlertingEnabled || !setting.ExecuteAlerts || e.Cfg.IsNgAlertEnabled()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init initializes the AlertingService.
|
// Init initializes the AlertingService.
|
||||||
|
Reference in New Issue
Block a user