Alerting: Display "Show all" button for cloud rules (#79512)

* Fix counting totals for cloud rules

* Address PR review
pull/79587/head
Virginia Cepeda 1 year ago committed by GitHub
parent 9dc015b595
commit 3e4abdeb18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/app/features/alerting/unified/hooks/useCombinedRuleNamespaces.ts

@ -275,11 +275,11 @@ export function calculateRuleTotals(rule: Pick<AlertingRule, 'alerts' | 'totals'
}
return {
alerting: result[AlertInstanceTotalState.Alerting],
alerting: result[AlertInstanceTotalState.Alerting] || result['firing'],
pending: result[AlertInstanceTotalState.Pending],
inactive: result[AlertInstanceTotalState.Normal],
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…
Cancel
Save