Do not include resolved alerts in API response

This commit is contained in:
Fabian Reinartz 2015-11-10 11:25:11 +01:00
parent 91db91ef4a
commit 5fb30e1a0e

View File

@ -98,8 +98,14 @@ func (d *Dispatcher) Groups() []*UIGroups {
groups = append(groups, uig)
}
now := time.Now()
var uiAlerts []*UIAlert
for _, a := range types.Alerts(alerts...) {
if a.EndsAt.Before(now) {
continue
}
sid, _ := d.marker.Silenced(a.Fingerprint())
uiAlerts = append(uiAlerts, &UIAlert{