Skip to content

Commit 9204513

Browse files
ahussein3foot
andauthored
Add v cluster type and icon to cluster table type (#3693)
* extract cluster icon to it's own component * fix lint * add cluster type and icon to cluster icon * run yarn lint * Adds support for eks --------- Co-authored-by: Simon <[email protected]> Co-authored-by: Simon Howe <[email protected]>
1 parent 531449f commit 9204513

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Diff for: ui/src/assets/img/VCluster.svg

+3
Loading

Diff for: ui/src/components/Clusters/ClusterIcon.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Kubernetes from '../../assets/img/Kubernetes.svg';
1010
import LiquidMetal from '../../assets/img/LiquidMetal.svg';
1111
import Openshift from '../../assets/img/Openshift.svg';
1212
import Rancher from '../../assets/img/Rancher.svg';
13+
import VCluster from '../../assets/img/VCluster.svg';
1314
import Vsphere from '../../assets/img/Vsphere.svg';
1415
import { GitopsClusterEnriched } from '../../types/custom';
1516
import { Routes } from '../../utils/nav';
@@ -27,7 +28,8 @@ const getClusterTypeIcon = (clusterType?: string) => {
2728
return Docker;
2829
} else if (
2930
clusterType === 'AWSCluster' ||
30-
clusterType === 'AWSManagedCluster'
31+
clusterType === 'AWSManagedCluster' ||
32+
clusterType === 'eks'
3133
) {
3234
return EKS;
3335
} else if (
@@ -46,6 +48,8 @@ const getClusterTypeIcon = (clusterType?: string) => {
4648
return Rancher;
4749
} else if (clusterType === 'Openshift') {
4850
return Openshift;
51+
} else if (clusterType === 'VCluster') {
52+
return VCluster;
4953
}
5054
return Kubernetes;
5155
};
@@ -74,9 +78,7 @@ export const ClusterIcon: FC<{ cluster: GitopsClusterEnriched }> = ({
7478
return (
7579
<Tooltip title={clusterKind || 'kubernetes'} placement="bottom">
7680
{isACD ? (
77-
<Link
78-
to={getACDLink()}
79-
>
81+
<Link to={getACDLink()}>
8082
<Badge
8183
anchorOrigin={{
8284
vertical: 'bottom',

Diff for: ui/src/components/Clusters/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import OpenedPullRequest from './OpenedPullRequest';
5353

5454

5555

56+
5657
const ClusterRowCheckbox = ({
5758
name,
5859
namespace,

0 commit comments

Comments
 (0)