From b5fbce50b3909540d44020176e2ef058662c85ed Mon Sep 17 00:00:00 2001 From: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:50:29 +0200 Subject: [PATCH] Alerting:Fix alert panel not rendering correct number for cloud rules instances (#67487) Fix alert panel not rendering correct number for cloud rules instances --- public/app/plugins/panel/alertlist/AlertInstances.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/alertlist/AlertInstances.tsx b/public/app/plugins/panel/alertlist/AlertInstances.tsx index 7437268bcad..85c40fd22b3 100644 --- a/public/app/plugins/panel/alertlist/AlertInstances.tsx +++ b/public/app/plugins/panel/alertlist/AlertInstances.tsx @@ -80,7 +80,10 @@ export const AlertInstances = ({ handleInstancesLimit(true); setDisplayInstances(true); }; - const totalInstancesNumber = limitInstances ? grafanaFilteredInstancesTotal : filteredAlerts.length; + const totalInstancesGrafana = limitInstances ? grafanaFilteredInstancesTotal : filteredAlerts.length; + const totalInstancesNotGrafana = filteredAlerts.length; + const totalInstancesNumber = isGrafanaAlert ? totalInstancesGrafana : totalInstancesNotGrafana; + const limitStatus = limitInstances ? `Showing ${INSTANCES_DISPLAY_LIMIT} of ${grafanaTotalInstances} instances` : `Showing all ${grafanaTotalInstances} instances`;