Alerting: Fix alert instances count display (#114965)

Alerting: fix alert instances count display
This commit is contained in:
Lauren
2025-12-08 14:54:46 +00:00
committed by GitHub
parent 692712961b
commit ccdb6ff261
2 changed files with 7 additions and 7 deletions
@@ -44,20 +44,21 @@ interface ShowMoreInstancesProps {
function ShowMoreInstances({ stats, onClick, href }: ShowMoreInstancesProps) {
const styles = useStyles2(getStyles);
const { visibleItemsCount, totalItemsCount } = stats;
return (
<div className={styles.footerRow}>
<div>
<Trans
i18nKey="alerting.rule-details-matching-instances.showing-count"
values={{ visibleItems: stats.visibleItemsCount, totalItems: stats.totalItemsCount }}
values={{ visibleItemsCount, totalItemsCount }}
>
Showing {'{{visibleItems}}'} out of {'{{totalItems}}'} instances
Showing {{ visibleItemsCount }} out of {{ totalItemsCount }} instances
</Trans>
</div>
<LinkButton size="sm" variant="secondary" data-testid="show-all" onClick={onClick} href={href}>
<Trans i18nKey="alerting.rule-details-matching-instances.button-show-all" count={stats.totalItemsCount}>
Show all {'{{totalItems}}'} alert instances
<Trans i18nKey="alerting.rule-details-matching-instances.button-show-all" values={{ totalItemsCount }}>
Show all {{ totalItemsCount }} alert instances
</Trans>
</LinkButton>
</div>
+2 -3
View File
@@ -2334,9 +2334,8 @@
"label-tenant-sources": "Tenant sources"
},
"rule-details-matching-instances": {
"button-show-all_one": "Show all {{totalItems}} alert instances",
"button-show-all_other": "Show all {{totalItems}} alert instances",
"showing-count": "Showing {{visibleItems}} out of {{totalItems}} instances"
"button-show-all": "Show all {{totalItemsCount}} alert instances",
"showing-count": "Showing {{visibleItemsCount}} out of {{totalItemsCount}} instances"
},
"rule-editor": {
"get-content": {