@@ -32,6 +32,7 @@ interface MetricsTabsProps {
32
32
blobStorageStats ?: TenantStorageStats [ ] ;
33
33
tabletStorageStats ?: TenantStorageStats [ ] ;
34
34
networkStats ?: TenantMetricStats [ ] ;
35
+ storageGroupsCount ?: number ;
35
36
}
36
37
37
38
export function MetricsTabs ( {
@@ -40,6 +41,7 @@ export function MetricsTabs({
40
41
blobStorageStats,
41
42
tabletStorageStats,
42
43
networkStats,
44
+ storageGroupsCount,
43
45
} : MetricsTabsProps ) {
44
46
const location = useLocation ( ) ;
45
47
const { metricsTab} = useTypedSelector ( ( state ) => state . tenant ) ;
@@ -73,7 +75,6 @@ export function MetricsTabs({
73
75
// Calculate storage metrics using utility
74
76
const storageStats = tabletStorageStats || blobStorageStats || [ ] ;
75
77
const storageMetrics = calculateMetricAggregates ( storageStats ) ;
76
- const storageGroupCount = storageStats . length ;
77
78
78
79
// Calculate memory metrics using utility
79
80
const memoryMetrics = calculateMetricAggregates ( memoryStats ) ;
@@ -91,8 +92,7 @@ export function MetricsTabs({
91
92
>
92
93
< Link to = { tabLinks . cpu } className = { b ( 'link' ) } >
93
94
< TabCard
94
- label = { i18n ( 'cards.cpu-label' ) }
95
- sublabel = { i18n ( 'context_cpu-load' ) }
95
+ text = { i18n ( 'context_cpu-load' ) }
96
96
value = { cpuMetrics . totalUsed }
97
97
limit = { cpuMetrics . totalLimit }
98
98
legendFormatter = { formatCoresLegend }
@@ -108,8 +108,11 @@ export function MetricsTabs({
108
108
>
109
109
< Link to = { tabLinks . storage } className = { b ( 'link' ) } >
110
110
< 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
+ }
113
116
value = { storageMetrics . totalUsed }
114
117
limit = { storageMetrics . totalLimit }
115
118
legendFormatter = { formatStorageLegend }
@@ -125,8 +128,7 @@ export function MetricsTabs({
125
128
>
126
129
< Link to = { tabLinks . memory } className = { b ( 'link' ) } >
127
130
< TabCard
128
- label = { i18n ( 'cards.memory-label' ) }
129
- sublabel = { i18n ( 'context_memory-used' ) }
131
+ text = { i18n ( 'context_memory-used' ) }
130
132
value = { memoryMetrics . totalUsed }
131
133
limit = { memoryMetrics . totalLimit }
132
134
legendFormatter = { formatStorageLegend }
@@ -143,8 +145,7 @@ export function MetricsTabs({
143
145
>
144
146
< Link to = { tabLinks . network } className = { b ( 'link' ) } >
145
147
< TabCard
146
- label = { i18n ( 'cards.network-label' ) }
147
- sublabel = { i18n ( 'context_network-usage' ) }
148
+ text = { i18n ( 'context_network-usage' ) }
148
149
value = { networkMetrics . totalUsed }
149
150
limit = { networkMetrics . totalLimit }
150
151
legendFormatter = { formatSpeedLegend }
0 commit comments