@@ -13,6 +13,10 @@ import {cn} from '../../../../../utils/cn';
1313import { SHOW_NETWORK_UTILIZATION } from '../../../../../utils/constants' ;
1414import { useSetting , useTypedSelector } from '../../../../../utils/hooks' ;
1515import { calculateMetricAggregates } from '../../../../../utils/metrics' ;
16+ import {
17+ formatCoresLegend ,
18+ formatStorageLegend ,
19+ } from '../../../../../utils/metrics/formatMetricLegend' ;
1620import { TenantTabsGroups , getTenantPath } from '../../../TenantPages' ;
1721import { TabCard } from '../TabCard/TabCard' ;
1822import i18n from '../i18n' ;
@@ -86,7 +90,7 @@ export function MetricsCards({
8690 sublabel = { i18n ( 'context_cpu-load' ) }
8791 value = { cpuMetrics . totalUsed }
8892 limit = { cpuMetrics . totalLimit }
89- unit = "cores"
93+ legendFormatter = { formatCoresLegend }
9094 active = { metricsTab === TENANT_METRICS_TABS_IDS . cpu }
9195 helpText = { i18n ( 'context_cpu-description' ) }
9296 />
@@ -103,7 +107,7 @@ export function MetricsCards({
103107 sublabel = { i18n ( 'context_storage-groups' , { count : storageGroupCount } ) }
104108 value = { storageMetrics . totalUsed }
105109 limit = { storageMetrics . totalLimit }
106- unit = "bytes"
110+ legendFormatter = { formatStorageLegend }
107111 active = { metricsTab === TENANT_METRICS_TABS_IDS . storage }
108112 helpText = { i18n ( 'context_storage-description' ) }
109113 />
@@ -120,7 +124,7 @@ export function MetricsCards({
120124 sublabel = { i18n ( 'context_memory-used' ) }
121125 value = { memoryMetrics . totalUsed }
122126 limit = { memoryMetrics . totalLimit }
123- unit = "bytes"
127+ legendFormatter = { formatStorageLegend }
124128 active = { metricsTab === TENANT_METRICS_TABS_IDS . memory }
125129 helpText = { i18n ( 'context_memory-description' ) }
126130 />
@@ -134,7 +138,7 @@ export function MetricsCards({
134138 sublabel = { i18n ( 'context_network-evaluation' ) }
135139 value = { networkMetrics . totalUsed }
136140 limit = { networkMetrics . totalLimit }
137- unit = "bytes"
141+ legendFormatter = { formatStorageLegend }
138142 active = { false }
139143 clickable = { false }
140144 helpText = { i18n ( 'context_network-description' ) }
0 commit comments