You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
405 B
17 lines
405 B
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
|
|
}
|
|
|