@@ -32,6 +32,7 @@ interface MetricsTabsProps {
3232 blobStorageStats ?: TenantStorageStats [ ] ;
3333 tabletStorageStats ?: TenantStorageStats [ ] ;
3434 networkStats ?: TenantMetricStats [ ] ;
35+ storageGroupsCount ?: number ;
3536}
3637
3738export function MetricsTabs ( {
@@ -40,6 +41,7 @@ export function MetricsTabs({
4041 blobStorageStats,
4142 tabletStorageStats,
4243 networkStats,
44+ storageGroupsCount,
4345} : MetricsTabsProps ) {
4446 const location = useLocation ( ) ;
4547 const { metricsTab} = useTypedSelector ( ( state ) => state . tenant ) ;
@@ -73,7 +75,6 @@ export function MetricsTabs({
7375 // Calculate storage metrics using utility
7476 const storageStats = tabletStorageStats || blobStorageStats || [ ] ;
7577 const storageMetrics = calculateMetricAggregates ( storageStats ) ;
76- const storageGroupCount = storageStats . length ;
7778
7879 // Calculate memory metrics using utility
7980 const memoryMetrics = calculateMetricAggregates ( memoryStats ) ;
@@ -91,8 +92,7 @@ export function MetricsTabs({
9192 >
9293 < Link to = { tabLinks . cpu } className = { b ( 'link' ) } >
9394 < TabCard
94- label = { i18n ( 'cards.cpu-label' ) }
95- sublabel = { i18n ( 'context_cpu-load' ) }
95+ text = { i18n ( 'context_cpu-load' ) }
9696 value = { cpuMetrics . totalUsed }
9797 limit = { cpuMetrics . totalLimit }
9898 legendFormatter = { formatCoresLegend }
@@ -108,8 +108,11 @@ export function MetricsTabs({
108108 >
109109 < Link to = { tabLinks . storage } className = { b ( 'link' ) } >
110110 < TabCard
111- label = { i18n ( 'cards.storage-label' ) }
112- sublabel = { i18n ( 'context_storage-groups' , { count : storageGroupCount } ) }
111+ text = {
112+ storageGroupsCount === undefined
113+ ? i18n ( 'cards.storage-label' )
114+ : i18n ( 'context_storage-groups' , { count : storageGroupsCount } )
115+ }
113116 value = { storageMetrics . totalUsed }
114117 limit = { storageMetrics . totalLimit }
115118 legendFormatter = { formatStorageLegend }
@@ -125,8 +128,7 @@ export function MetricsTabs({
125128 >
126129 < Link to = { tabLinks . memory } className = { b ( 'link' ) } >
127130 < TabCard
128- label = { i18n ( 'cards.memory-label' ) }
129- sublabel = { i18n ( 'context_memory-used' ) }
131+ text = { i18n ( 'context_memory-used' ) }
130132 value = { memoryMetrics . totalUsed }
131133 limit = { memoryMetrics . totalLimit }
132134 legendFormatter = { formatStorageLegend }
@@ -143,8 +145,7 @@ export function MetricsTabs({
143145 >
144146 < Link to = { tabLinks . network } className = { b ( 'link' ) } >
145147 < TabCard
146- label = { i18n ( 'cards.network-label' ) }
147- sublabel = { i18n ( 'context_network-usage' ) }
148+ text = { i18n ( 'context_network-usage' ) }
148149 value = { networkMetrics . totalUsed }
149150 limit = { networkMetrics . totalLimit }
150151 legendFormatter = { formatSpeedLegend }
0 commit comments