Skip to content

Commit 19ca3bd

Browse files
fix(Cluster): use counter from uikit for tabs (#428)
1 parent 5d308cd commit 19ca3bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/containers/Cluster/Cluster.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ function Cluster({
124124
const getTabEntityCount = (tabId: ClusterTab) => {
125125
switch (tabId) {
126126
case clusterTabsIds.tenants: {
127-
return cluster?.Tenants;
127+
return cluster?.Tenants ? Number(cluster.Tenants) : undefined;
128128
}
129129
case clusterTabsIds.nodes: {
130-
return cluster?.NodesTotal;
130+
return cluster?.NodesTotal ? Number(cluster.NodesTotal) : undefined;
131131
}
132132
default: {
133-
return null;
133+
return undefined;
134134
}
135135
}
136136
};
@@ -153,7 +153,7 @@ function Cluster({
153153
items={clusterTabs.map((item) => {
154154
return {
155155
...item,
156-
title: `${item.title} ${getTabEntityCount(item.id) || ''}`,
156+
counter: getTabEntityCount(item.id),
157157
};
158158
})}
159159
wrapTo={({id}, node) => {

0 commit comments

Comments
 (0)