Skip to content

Commit 5819b8b

Browse files
khushi1310khushiPriteshKiri
authored
fixed_azure_logo_in_chaosHub Signed-off-by: khushi Tiwari (#5294)
* fixed_azure_logo_in_chaosHub Signed-off-by: khushi Tiwari <[email protected]> Signed-off-by: khushi Tiwari <[email protected]> * fix: correct Azure fault icon rendering in ChaosFaults component Signed-off-by: khushi Tiwari <[email protected]> --------- Signed-off-by: khushi Tiwari <[email protected]> Signed-off-by: khushi1310 <[email protected]> Co-authored-by: khushi <[email protected]> Co-authored-by: Pritesh Kiri <[email protected]>
1 parent a14df79 commit 5819b8b

File tree

9 files changed

+35
-38
lines changed

9 files changed

+35
-38
lines changed

chaoscenter/web/src/components/LitmusBreadCrumbs/LitmusBreadCrumbs.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ export default function LitmusBreadCrumbs({ baseUrl, ...rest }: LitmusBreadCrumb
1818
...(rest.links || [])
1919
];
2020

21-
const validLinks = combinedLinks.filter(
22-
link => link && typeof link.label === 'string' && link.label.trim() !== ''
23-
);
21+
const validLinks = combinedLinks.filter(link => link && typeof link.label === 'string' && link.label.trim() !== '');
2422

2523
return <Breadcrumbs {...rest} links={validLinks} />;
2624
}

chaoscenter/web/src/views/AddProbeModalWizard/AddProbeModalWizard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ const TunePropertiesStep: React.FC<StepProps<StepData>> = props => {
355355
{formikProps => {
356356
return (
357357
<Form style={{ height: '100%' }}>
358-
<Layout.Vertical height={516} style={{ overflow: 'auto' }} padding={{ left: "xsmall", right: "xsmall" }}>
358+
<Layout.Vertical height={516} style={{ overflow: 'auto' }} padding={{ left: 'xsmall', right: 'xsmall' }}>
359359
<Text font={{ variation: FontVariation.H3 }} color={Color.GREY_800} margin={{ bottom: 'large' }}>
360360
{getString(`properties`)}
361361
</Text>

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function ChaosFaults({ hubDetails, faultCategories, loading, searchValue }: Chao
8989
};
9090

9191
const FaultCard = (fault: Fault): React.ReactElement => {
92+
const isAzureFault = fault.tag.toLowerCase() === 'azure';
9293
const isChartNameAws = fault.chartName.toLowerCase().includes('aws');
9394
const isK6Fault = fault.name.toLowerCase().includes('k6-loadgen');
9495
const isGcpFault = fault.tag.toLowerCase() === 'gcp';
@@ -102,7 +103,15 @@ function ChaosFaults({ hubDetails, faultCategories, loading, searchValue }: Chao
102103
<Card key={fault.name} interactive className={css.insideCard}>
103104
<Layout.Vertical spacing="medium">
104105
<Layout.Horizontal spacing="small">
105-
{isChartNameAws ? (
106+
{isAzureFault ? (
107+
<img
108+
src="https://hub.litmuschaos.io/api/icon/3.22.0/azure/azure-instance-stop.png"
109+
alt="Azure"
110+
width={23}
111+
height={23}
112+
style={{ objectFit: 'contain' }}
113+
/>
114+
) : isChartNameAws ? (
106115
<img
107116
src="https://hub.litmuschaos.io/api/icon/3.22.0/aws/aws-az-chaos.png"
108117
alt="AWS"

chaoscenter/web/src/views/ChaosHubs/ChaosHubs.module.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,11 @@
4646
.card {
4747
min-height: 260px;
4848
gap: 1rem;
49-
5049
}
5150

5251
.chaosHubCard {
5352
position: relative;
5453

55-
56-
5754
.tagsList {
5855
display: flex;
5956
align-items: center;

chaoscenter/web/src/views/Environments/EnvironmentList/EnvironmentsList.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
max-width: 320px;
112112
}
113113

114-
115114
.noEnvExecution {
116115
width: 100%;
117116
display: flex;
@@ -145,4 +144,4 @@
145144
.button {
146145
margin-top: 20px;
147146
}
148-
}
147+
}

chaoscenter/web/src/views/Environments/EnvironmentList/EnvironmentsList.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,8 @@ export default function EnvironmentListView({
125125
{environmentTableData === null && !loading.listEnvironments ? (
126126
<Container className={css.noEnvExecution} height="calc(100vh - 100px)">
127127
<img src={Envirnoment} alt={getString('environment')} />
128-
<Text className={css.title}>
129-
{getString('noEnvironmentFound')}
130-
</Text>
131-
<Text className={css.subtitle}>
132-
{getString('noEnvironmentFoundNewMessage')}
133-
</Text>
128+
<Text className={css.title}>{getString('noEnvironmentFound')}</Text>
129+
<Text className={css.subtitle}>{getString('noEnvironmentFoundNewMessage')}</Text>
134130
</Container>
135131
) : (
136132
<Loader

chaoscenter/web/src/views/ExperimentBuilderTemplateSelection/blankCanvasTemplate.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ export default function blankCanvasTemplate(
1111
switch (infrastructureType) {
1212
case InfrastructureType.KUBERNETES:
1313
return kubernetesBlankCanvasTemplate(
14-
experimentName,
14+
experimentName,
1515
experiment?.chaosInfrastructure?.namespace,
16-
undefined,
17-
experiment?.imageRegistry,
16+
undefined,
17+
experiment?.imageRegistry
1818
);
1919
}
2020
}

chaoscenter/web/src/views/KubernetesChaosInfrastructureTable/KubernetesChaosInfrastructureTable.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ export function RenderChaosInfrastructureOptions({
7878
text={`kubectl delete chaosexperiment,chaosengine,chaosresult --all -n ${chaosInfrastructureNamespace}`}
7979
isCopyButtonEnabled
8080
/>
81-
82-
8381
</Container>
8482
{chaosInfrastructureScope === InfraScope.NAMESPACE && (
8583
<Layout.Vertical spacing="small">

chaoscenter/web/src/views/StudioOverview/StudioOverview.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import { ChaosInfrastructureReferenceFieldProps, StudioErrorState, StudioTabs }
2323
import experimentYamlService from 'services/experiment';
2424
import KubernetesChaosInfrastructureReferenceFieldController from '@controllers/KubernetesChaosInfrastructureReferenceField';
2525
import { InfrastructureType } from '@api/entities';
26-
import { getImageRegistry } from '@api/core/ImageRegistry';
27-
import { getScope } from '@utils';
26+
import { getImageRegistry } from '@api/core/ImageRegistry';
27+
import { getScope } from '@utils';
2828
import css from './StudioOverview.module.scss';
2929

3030
interface StudioOverviewViewProps {
@@ -56,17 +56,18 @@ export default function StudioOverviewView({
5656

5757
const scope = getScope();
5858

59-
// Fetch the image registry data using Apollo's useQuery hook
60-
const { data: getImageRegistryData, loading: imageRegistryLoading } = getImageRegistry({
61-
projectID: scope.projectID,
59+
// Fetch the image registry data using Apollo's useQuery hook
60+
const { data: getImageRegistryData, loading: imageRegistryLoading } = getImageRegistry({
61+
projectID: scope.projectID
6262
});
6363

64-
const imageRegistry = getImageRegistryData?.getImageRegistry?{
65-
name: getImageRegistryData.getImageRegistry.imageRegistryInfo.imageRegistryName,
66-
repo: getImageRegistryData.getImageRegistry.imageRegistryInfo.imageRepoName,
67-
secret: getImageRegistryData.getImageRegistry.imageRegistryInfo.secretName,
68-
}
69-
: undefined;
64+
const imageRegistry = getImageRegistryData?.getImageRegistry
65+
? {
66+
name: getImageRegistryData.getImageRegistry.imageRegistryInfo.imageRegistryName,
67+
repo: getImageRegistryData.getImageRegistry.imageRegistryInfo.imageRepoName,
68+
secret: getImageRegistryData.getImageRegistry.imageRegistryInfo.secretName
69+
}
70+
: undefined;
7071

7172
React.useEffect(() => {
7273
experimentHandler?.getExperiment(experimentKey).then(experiment => {
@@ -101,8 +102,7 @@ export default function StudioOverviewView({
101102
})
102103
})}
103104
onSubmit={values => {
104-
105-
values.imageRegistry = imageRegistry
105+
values.imageRegistry = imageRegistry;
106106

107107
if (values.chaosInfrastructure.namespace === undefined) {
108108
delete values.chaosInfrastructure.namespace;
@@ -164,10 +164,10 @@ export default function StudioOverviewView({
164164
onClick={openDiscardDialog}
165165
/>
166166
<Button
167-
type="submit"
168-
intent="primary"
169-
text={getString('next')}
170-
rightIcon="chevron-right"
167+
type="submit"
168+
intent="primary"
169+
text={getString('next')}
170+
rightIcon="chevron-right"
171171
disabled={imageRegistryLoading}
172172
/>
173173
</Layout.Horizontal>

0 commit comments

Comments
 (0)