Alerting: Fix alert instances count display (#114965)
Alerting: fix alert instances count display
This commit is contained in:
+5
-4
@@ -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>
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user