Skip to content

Commit

Permalink
Refactor ISVApplyActions to use ISVSkipModal and update modal content…
Browse files Browse the repository at this point in the history
… with platform-specific information
  • Loading branch information
ziyang-lin-404 committed Feb 10, 2025
1 parent 7c7376c commit a6cb5a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/react/ISV/components/ISVApplyActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ import { useQueryClient } from 'react-query';
import styled, { useTheme } from 'styled-components';
import { useBasenameRelativeNavigate } from '@scality/module-federation';
import { useMutationTableData } from '../../ui-elements/Veeam/useMutationTableData';
import { VeeamSkipModal } from '../../ui-elements/Veeam/VeeamSkipModal';
import { ISVStepsIndexes, ISV_STEPS } from './ISVSteps';
import { memo } from 'react';
import { ISVSkipModal } from './ISVSkipModal';
import { ISVPlatformConfig } from '../types';

export const ListItem = styled.li`
padding: 0.5rem;
`;

export type ISVApplyActionsProps = {
platform: ISVPlatformConfig;
accountName: string;
bucketName: string;
application: string;
Expand Down Expand Up @@ -140,29 +142,16 @@ export default memo(function ISVApplyActions(

return (
<>
<VeeamSkipModal
<ISVSkipModal
isOpen={confirmCancel}
close={() => setConfirmCancel(false)}
exitAction={() => navigate('/')}
modalContent={
<ul>
<ListItem>
<Text>
Any resources already created in this flow will be kept.
</Text>
</ListItem>
<ListItem>
<Text>
To start Veeam assistant configuration again, you can go to the{' '}
<b>Accounts</b> page.
</Text>
</ListItem>
</ul>
}
title={`Exit ${propsConfiguration.platform.name} Assistant Configuration`}
modalContent={propsConfiguration.platform.skipModalContent}
/>
<Form
layout={{
title: 'Configure ARTESCA for Veeam',
title: `Configure ARTESCA for ${propsConfiguration.platform.name}`,
kind: 'page',
}}
requireMode="all"
Expand Down
1 change: 1 addition & 0 deletions src/react/ISV/components/ISVConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ export const ISVConfiguration = () => {
setConfig(data);
next({
...data,
platform,
capacityBytes: getCapacityBytes(
data.buckets[0].capacity,
data.buckets[0].capacityUnit,
Expand Down

0 comments on commit a6cb5a9

Please sign in to comment.