mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Display "Show all" button for cloud rules (#79512)
* Fix counting totals for cloud rules * Address PR review
This commit is contained in:
parent
9dc015b595
commit
3e4abdeb18
@ -275,11 +275,11 @@ export function calculateRuleTotals(rule: Pick<AlertingRule, 'alerts' | 'totals'
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
alerting: result[AlertInstanceTotalState.Alerting],
|
alerting: result[AlertInstanceTotalState.Alerting] || result['firing'],
|
||||||
pending: result[AlertInstanceTotalState.Pending],
|
pending: result[AlertInstanceTotalState.Pending],
|
||||||
inactive: result[AlertInstanceTotalState.Normal],
|
inactive: result[AlertInstanceTotalState.Normal],
|
||||||
nodata: result[AlertInstanceTotalState.NoData],
|
nodata: result[AlertInstanceTotalState.NoData],
|
||||||
error: result[AlertInstanceTotalState.Error] + result['err'], // Prometheus uses "err" instead of "error"
|
error: result[AlertInstanceTotalState.Error] || result['err'] || undefined, // Prometheus uses "err" instead of "error"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user