Skip to content

Commit

Permalink
Add v cluster type and icon to cluster table type (#3693)
Browse files Browse the repository at this point in the history
* 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 <footless@gmail.com>
Co-authored-by: Simon Howe <simon@weave.works>
  • Loading branch information
3 people authored Dec 12, 2023
1 parent 531449f commit 9204513
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ui/src/assets/img/VCluster.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions ui/src/components/Clusters/ClusterIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Kubernetes from '../../assets/img/Kubernetes.svg';
import LiquidMetal from '../../assets/img/LiquidMetal.svg';
import Openshift from '../../assets/img/Openshift.svg';
import Rancher from '../../assets/img/Rancher.svg';
import VCluster from '../../assets/img/VCluster.svg';
import Vsphere from '../../assets/img/Vsphere.svg';
import { GitopsClusterEnriched } from '../../types/custom';
import { Routes } from '../../utils/nav';
Expand All @@ -27,7 +28,8 @@ const getClusterTypeIcon = (clusterType?: string) => {
return Docker;
} else if (
clusterType === 'AWSCluster' ||
clusterType === 'AWSManagedCluster'
clusterType === 'AWSManagedCluster' ||
clusterType === 'eks'
) {
return EKS;
} else if (
Expand All @@ -46,6 +48,8 @@ const getClusterTypeIcon = (clusterType?: string) => {
return Rancher;
} else if (clusterType === 'Openshift') {
return Openshift;
} else if (clusterType === 'VCluster') {
return VCluster;
}
return Kubernetes;
};
Expand Down Expand Up @@ -74,9 +78,7 @@ export const ClusterIcon: FC<{ cluster: GitopsClusterEnriched }> = ({
return (
<Tooltip title={clusterKind || 'kubernetes'} placement="bottom">
{isACD ? (
<Link
to={getACDLink()}
>
<Link to={getACDLink()}>
<Badge
anchorOrigin={{
vertical: 'bottom',
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/Clusters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import OpenedPullRequest from './OpenedPullRequest';




const ClusterRowCheckbox = ({
name,
namespace,
Expand Down

0 comments on commit 9204513

Please sign in to comment.