mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix NoData & Error alerts not resolving when rule is reset (#80184)
* Alerting: Fix NoData & Error alerts not resolving when rule is reset On rule reset, when creating the PostableAlerts StateToPostableAlert did not attach the correct NoData/Error alertname and rulename labels to expire/resolve the active alerts when the previous cached state was NoData/Error.
This commit is contained in:
@@ -105,7 +105,7 @@ func (srv TestingApiSrv) RouteTestGrafanaRuleConfig(c *contextmodel.ReqContext,
|
||||
|
||||
alerts := make([]*amv2.PostableAlert, 0, len(transitions))
|
||||
for _, alertState := range transitions {
|
||||
alerts = append(alerts, state.StateToPostableAlert(alertState.State, srv.appUrl))
|
||||
alerts = append(alerts, state.StateToPostableAlert(alertState, srv.appUrl))
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, alerts)
|
||||
|
||||
Reference in New Issue
Block a user