Alerting:Fix alert panel not rendering correct number for cloud rules instances (#67487)

Fix alert panel not rendering correct number for cloud rules instances
This commit is contained in:
Sonia Aguilar 2023-04-28 12:50:29 +02:00 committed by GitHub
parent 533f8caafd
commit b5fbce50b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`;