Skip to content

Commit a71690e

Browse files
committed
feat(chaoshub): replace litmus logo with vmware logo on fault card
Signed-off-by: Prakhar Sharma <[email protected]>
1 parent 70fa179 commit a71690e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
73.2 KB
Loading

chaoscenter/web/src/views/ChaosHub/ChaosFaults/ChaosFaults.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Fallback } from '@errors';
1111
import Loader from '@components/Loader';
1212
import { useSearchParams, useRouteWithBaseUrl } from '@hooks';
1313
import type { ListFaultResponse } from '@api/core';
14+
1415
import css from './ChaosFaults.module.scss';
1516

1617
interface ChaosFaultsProps {
@@ -89,6 +90,7 @@ function ChaosFaults({ hubDetails, faultCategories, loading, searchValue }: Chao
8990
};
9091

9192
const FaultCard = (fault: Fault): React.ReactElement => {
93+
const isVmwareFault = fault.tag.toLowerCase() === 'vmware';
9294
const isGcpFault = fault.tag.toLowerCase() === 'gcp';
9395
return (
9496
<Link
@@ -101,16 +103,29 @@ function ChaosFaults({ hubDetails, faultCategories, loading, searchValue }: Chao
101103
<Layout.Vertical spacing="medium">
102104
<Layout.Horizontal spacing="small">
103105
{isGcpFault ? (
106+
// Show GCP Logo (Existing logic)
104107
<img
105108
src="https://hub.litmuschaos.io/api/icon/3.22.0/gcp/gcp-vm-instance-stop.png"
106109
alt="GCP"
107110
width={23}
108111
height={23}
109112
style={{ objectFit: 'contain' }}
110113
/>
114+
) : isVmwareFault ? (
115+
// Show VMware Logo using the external URL pattern
116+
<img
117+
src="https://hub.litmuschaos.io/api/icon/3.22.0/vmware/vmware-vm-poweroff.png"
118+
alt="VMware"
119+
width={23}
120+
height={23}
121+
style={{ objectFit: 'contain' }}
122+
/>
111123
) : (
124+
// Show default Litmus Logo
112125
<Icon size={23} name="chaos-litmuschaos" />
113126
)}
127+
<Text font={{ variation: FontVariation.BODY, weight: 'semi-bold' }} color={Color.PRIMARY_7}></Text>
128+
114129
<Text font={{ variation: FontVariation.BODY, weight: 'semi-bold' }} color={Color.PRIMARY_7}>
115130
{fault.displayName === ''
116131
? toTitleCase({

0 commit comments

Comments
 (0)