mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* Remove `ngalert` feature toggle * Update frontend Remove all references of ngalert feature toggle * Update docs * Disable unified alerting for specific orgs * Add backend tests * Apply suggestions from code review Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> * Disabled unified alerting by default * Ensure backward compatibility with old ngalert feature toggle * Apply suggestions from code review Co-authored-by: gotjosh <josue@grafana.com>
18 lines
405 B
Go
18 lines
405 B
Go
package schedule
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/services/ngalert/models"
|
|
)
|
|
|
|
func (sch *schedule) fetchAllDetails(disabledOrgs []int64) []*models.AlertRule {
|
|
q := models.ListAlertRulesQuery{
|
|
ExcludeOrgs: disabledOrgs,
|
|
}
|
|
err := sch.ruleStore.GetAlertRulesForScheduling(&q)
|
|
if err != nil {
|
|
sch.log.Error("failed to fetch alert definitions", "err", err)
|
|
return nil
|
|
}
|
|
return q.Result
|
|
}
|