diff --git a/packages/forklift-console-plugin/locales/en/plugin__forklift-console-plugin.json b/packages/forklift-console-plugin/locales/en/plugin__forklift-console-plugin.json index bd34fc4d5..27698a228 100644 --- a/packages/forklift-console-plugin/locales/en/plugin__forklift-console-plugin.json +++ b/packages/forklift-console-plugin/locales/en/plugin__forklift-console-plugin.json @@ -68,9 +68,8 @@ "Controls the interval at which a new snapshot is requested prior to initiating a warm migration. The default value is 60 minutes.": "Controls the interval at which a new snapshot is requested prior to initiating a warm migration. The default value is 60 minutes.", "Copied": "Copied", "Copy": "Copy", + "Create": "Create", "Create a migration plan and select VMs from the source provider for migration.": "Create a migration plan and select VMs from the source provider for migration.", - "Create and edit": "Create and edit", - "Create and start": "Create and start", "Create migration plan": "Create migration plan", "Create NetworkMap": "Create NetworkMap", "Create new provider": "Create new provider", diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/ProvidersCreateVmMigrationPage.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/ProvidersCreateVmMigrationPage.tsx index 0323112ae..3a213c39b 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/ProvidersCreateVmMigrationPage.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/ProvidersCreateVmMigrationPage.tsx @@ -37,21 +37,21 @@ const ProvidersCreateVmMigrationPage: FC = () => { return ( - } - variant="info" - title={t('How to create a migration plan')} - > - - To migrate virtual machines select target provider, namespace, mappings and click the{' '} - Create button to crete the plan. - - - - + + } + variant="info" + title={t('How to create a migration plan')} + > + + To migrate virtual machines select target provider, namespace, mappings and click the{' '} + Create button to crete the plan. + + - + + {state.flow.apiError && ( { - - - diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/EditableDescriptionItem.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/EditableDescriptionItem.tsx index a90c5d5c8..873fcbe6b 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/EditableDescriptionItem.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/EditableDescriptionItem.tsx @@ -15,7 +15,8 @@ export const EditableDescriptionItem: FC<{ content: ReactNode; ariaEditLabel: string; onEdit: () => void; -}> = ({ title, content, ariaEditLabel = 'Edit', onEdit }) => ( + isDisabled?: boolean; +}> = ({ title, content, ariaEditLabel = 'Edit', onEdit, isDisabled = false }) => ( {title} @@ -25,9 +26,9 @@ export const EditableDescriptionItem: FC<{ className="forklift-page-editable-description-item-button" style={{ paddingTop: 0 }} variant="plain" - icon={} - aria-label={ariaEditLabel} - onClick={onEdit} + {...(isDisabled + ? {} + : { icon: , onClick: onEdit, 'aria-Label': ariaEditLabel })} /> diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/PlansCreateForm.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/PlansCreateForm.tsx index e4c54c88d..9552e5ea2 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/PlansCreateForm.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/migrate/components/PlansCreateForm.tsx @@ -74,6 +74,7 @@ const buildStorageMessages = ( }); export const PlansCreateForm = ({ + children, state: { underConstruction: { plan, netMap, storageMap }, validation, @@ -99,6 +100,7 @@ export const PlansCreateForm = ({ }, dispatch, }: { + children?; state: CreateVmMigrationPageState; dispatch: (action: PageAction) => void; }) => { @@ -137,6 +139,7 @@ export const PlansCreateForm = ({ } > + {children} dispatch(setPlanName(value?.trim() ?? ''))} /> @@ -170,6 +174,7 @@ export const PlansCreateForm = ({ content={plan.metadata.name} ariaEditLabel={t('Edit plan name')} onEdit={() => setIsNameEdited(true)} + isDisabled={flow.editingDone} /> )} dispatch(setPlanTargetProvider(value))} validated={validation.targetProvider} id="targetProvider" + isDisabled={flow.editingDone} > {[ setIsTargetProviderEdited(true)} + isDisabled={flow.editingDone} /> )} {isTargetNamespaceEdited || @@ -264,6 +271,7 @@ export const PlansCreateForm = ({ onChange={(value) => dispatch(setPlanTargetNamespace(value))} validated={validation.targetNamespace} id="targetNamespace" + isDisabled={flow.editingDone} > {[ setIsTargetNamespaceEdited(true)} + isDisabled={flow.editingDone} /> )}