Skip to content

Commit d2e43d4

Browse files
fix(Cluster): remove tabs icons and numbers (#473)
1 parent e81d3d3 commit d2e43d4

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

src/assets/icons/versions.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/containers/Cluster/Cluster.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,6 @@ function Cluster({
118118
}
119119
};
120120

121-
const getTabEntityCount = (tabId: ClusterTab) => {
122-
switch (tabId) {
123-
case clusterTabsIds.tenants: {
124-
return cluster?.Tenants ? Number(cluster.Tenants) : undefined;
125-
}
126-
case clusterTabsIds.nodes: {
127-
return cluster?.NodesTotal ? Number(cluster.NodesTotal) : undefined;
128-
}
129-
default: {
130-
return undefined;
131-
}
132-
}
133-
};
134-
135121
return (
136122
<div className={b()}>
137123
<ClusterInfo
@@ -147,12 +133,7 @@ function Cluster({
147133
size="l"
148134
allowNotSelected={true}
149135
activeTab={activeTab as string}
150-
items={clusterTabs.map((item) => {
151-
return {
152-
...item,
153-
counter: getTabEntityCount(item.id),
154-
};
155-
})}
136+
items={clusterTabs}
156137
wrapTo={({id}, node) => {
157138
const path = getClusterPath(id as ClusterTab, queryParams);
158139
return (

src/containers/Cluster/utils.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import {Icon} from '@gravity-ui/uikit';
2-
import cubes3Icon from '@gravity-ui/icons/svgs/cubes-3.svg';
3-
import databasesIcon from '@gravity-ui/icons/svgs/databases.svg';
4-
import hardDriveIcon from '@gravity-ui/icons/svgs/hard-drive.svg';
5-
6-
import versionsIcon from '../../assets/icons/versions.svg';
7-
81
import type {ValueOf} from '../../types/common';
92
import routes, {createHref} from '../../routes';
103

@@ -20,22 +13,18 @@ export type ClusterTab = ValueOf<typeof clusterTabsIds>;
2013
const tenants = {
2114
id: clusterTabsIds.tenants,
2215
title: 'Databases',
23-
icon: <Icon data={databasesIcon} />,
2416
};
2517
const nodes = {
2618
id: clusterTabsIds.nodes,
2719
title: 'Nodes',
28-
icon: <Icon data={cubes3Icon} />,
2920
};
3021
const storage = {
3122
id: clusterTabsIds.storage,
3223
title: 'Storage',
33-
icon: <Icon data={hardDriveIcon} />,
3424
};
3525
const versions = {
3626
id: clusterTabsIds.versions,
3727
title: 'Versions',
38-
icon: <Icon data={versionsIcon} />,
3928
};
4029

4130
export const clusterTabs = [tenants, nodes, storage, versions];

0 commit comments

Comments
 (0)