Skip to content

Commit 1b3f3de

Browse files
committed
fixes
1 parent 0743aa5 commit 1b3f3de

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

public/locales/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@
373373
"create": "Create",
374374
"close": "Close",
375375
"back": "Back",
376-
"cancel": "Cancel"
376+
"cancel": "Cancel",
377+
"update": "Update"
377378
},
378379
"yaml": {
379380
"copiedToClipboard": "YAML copied to clipboard!",
@@ -384,6 +385,11 @@
384385
"titleText": "Managed Control Plane Created Successfully!",
385386
"subtitleText": "Your Managed Control Plane is being set up. It will be ready to use in just a few minutes. You can safely close this window."
386387
},
388+
"editMCP": {
389+
"dialogTitle": "Edit Managed Control Plane",
390+
"titleText": "Managed Control Plane Updated Successfully!",
391+
"subtitleText": "Your Managed Control Plane is being updated. It will be ready to use in just a few minutes. You can safely close this window."
392+
},
387393
"componentsSelection": {
388394
"selectComponents": "Select Components",
389395
"selectedComponents": "Selected Components",

src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.tsx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export const CreateManagedControlPlaneWizardContainer: FC<CreateManagedControlPl
162162
metadata: t('buttons.next'),
163163
members: t('buttons.next'),
164164
componentSelection: t('buttons.next'),
165-
summarize: t('buttons.create'),
165+
summarize: isEditMode ? t('buttons.update') : t('buttons.create'),
166166
success: t('buttons.close'),
167167
}),
168168
[t],
@@ -489,7 +489,7 @@ export const CreateManagedControlPlaneWizardContainer: FC<CreateManagedControlPl
489489
return (
490490
<Dialog
491491
stretch
492-
headerText={t('createMCP.dialogTitle') || 'Create Managed Control Plane'}
492+
headerText={isEditMode ? t('editMCP.dialogTitle') : t('createMCP.dialogTitle')}
493493
open={isOpen}
494494
initialFocus="project-name-input"
495495
footer={
@@ -592,11 +592,19 @@ export const CreateManagedControlPlaneWizardContainer: FC<CreateManagedControlPl
592592
selected={selectedStep === 'success'}
593593
data-step="success"
594594
>
595-
<IllustratedBanner
596-
illustrationName={IllustrationMessageType.SuccessScreen}
597-
title={t('createMCP.titleText')}
598-
subtitle={t('createMCP.subtitleText')}
599-
/>
595+
{isEditMode ? (
596+
<IllustratedBanner
597+
illustrationName={IllustrationMessageType.SuccessScreen}
598+
title={t('editMCP.titleText')}
599+
subtitle={t('editMCP.subtitleText')}
600+
/>
601+
) : (
602+
<IllustratedBanner
603+
illustrationName={IllustrationMessageType.SuccessScreen}
604+
title={t('createMCP.titleText')}
605+
subtitle={t('createMCP.subtitleText')}
606+
/>
607+
)}
600608
</WizardStep>
601609
</Wizard>
602610
</Dialog>

src/components/Wizards/CreateManagedControlPlane/EditManagedControlPlaneWizardDataLoader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { FC } from 'react';
22
import { useApiResource } from '../../../lib/api/useApiResource.ts';
33
import { ResourceObject } from '../../../lib/api/types/crate/resourceObject.ts';
44
import styles from './EditManagedControlPlaneWizardDataLoader.module.css';
5-
import Loading from '../../Shared/Loading.tsx';
5+
66
import { CreateManagedControlPlaneWizardContainer } from './CreateManagedControlPlaneWizardContainer.tsx';
77
import { PROJECT_NAME_LABEL, WORKSPACE_LABEL } from '../../../lib/api/types/shared/keyNames.ts';
88
import { ManagedControlPlaneInterface } from './mcp_type.ts';

0 commit comments

Comments
 (0)