Skip to content

Commit 8d5dc00

Browse files
committed
fix
1 parent 9114764 commit 8d5dc00

File tree

4 files changed

+31
-28
lines changed

4 files changed

+31
-28
lines changed

src/components/Members/ImportMembersDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const ImportMembersDialog: FC<ImportMembersDialogProps> = ({
6363
? ResourceObject<SpecMembers>('', 'projects', projectName)
6464
: ResourceObject<SpecMembers>(`project-${projectName}`, 'workspaces', workspaceName ?? ''),
6565
undefined,
66-
true,
66+
null,
6767
!isOpen,
6868
);
6969

src/components/Wizards/CreateManagedControlPlane/SummarizeStep.tsx

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,21 @@ export const SummarizeStep: React.FC<SummarizeStepProps> = ({
3232
isEditMode = false,
3333
}) => {
3434
const { t } = useTranslation();
35-
const yamlString = stringify(
36-
CreateManagedControlPlane(
37-
watch('name'),
38-
`${projectName}--ws-${workspaceName}`,
39-
{
40-
displayName: watch('displayName'),
41-
chargingTarget: watch('chargingTarget'),
42-
members: watch('members'),
43-
componentsList: componentsList ?? [],
44-
chargingTargetType: watch('chargingTargetType'),
45-
},
46-
idpPrefix,
47-
),
35+
const resource = CreateManagedControlPlane(
36+
watch('name'),
37+
`${projectName}--ws-${workspaceName}`,
38+
{
39+
displayName: watch('displayName'),
40+
chargingTarget: watch('chargingTarget'),
41+
members: watch('members'),
42+
componentsList: componentsList ?? [],
43+
chargingTargetType: watch('chargingTargetType'),
44+
},
45+
idpPrefix,
4846
);
47+
const yamlString = stringify(resource);
48+
const apiGroupName = resource?.apiVersion?.split('/')[0] ?? 'core.openmcp.cloud';
49+
const apiVersion = resource?.apiVersion?.split('/')[1] ?? 'v1alpha1';
4950
return (
5051
<div className={styles.wrapper}>
5152
<Title>{t('common.summarize')}</Title>
@@ -94,7 +95,12 @@ export const SummarizeStep: React.FC<SummarizeStepProps> = ({
9495
)}
9596
/>
9697
) : (
97-
<YamlSummarize yamlString={yamlString} filename={`mcp_${projectName}--ws-${workspaceName}`} />
98+
<YamlSummarize
99+
yamlString={yamlString}
100+
filename={`mcp_${projectName}--ws-${workspaceName}`}
101+
apiVersion={apiVersion}
102+
apiGroupName={apiGroupName}
103+
/>
98104
)}
99105
</div>
100106
</Grid>

src/components/Wizards/CreateManagedControlPlane/YamlSummarize.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ import { YamlViewerSchemaLoader } from '../../Yaml/YamlViewerSchemaLoader.tsx';
99
type YamlPanelProps = {
1010
yamlString: string;
1111
filename: string;
12+
apiGroupName: string;
13+
apiVersion: string;
1214
};
1315

14-
const YamlSummarize: FC<YamlPanelProps> = ({ yamlString, filename }) => {
16+
const YamlSummarize: FC<YamlPanelProps> = ({ yamlString, filename, apiVersion, apiGroupName }) => {
1517
const { t } = useTranslation();
1618
const { copyToClipboard } = useCopyToClipboard();
1719
const downloadYaml = () => {
@@ -38,7 +40,13 @@ const YamlSummarize: FC<YamlPanelProps> = ({ yamlString, filename }) => {
3840
</Button>
3941
)}
4042
</FlexBox>
41-
<YamlViewerSchemaLoader yamlString={yamlString} filename={filename} isEdit={false} />
43+
<YamlViewerSchemaLoader
44+
apiGroupName={apiGroupName}
45+
apiVersion={apiVersion}
46+
yamlString={yamlString}
47+
filename={filename}
48+
isEdit={false}
49+
/>
4250
</div>
4351
);
4452
};

src/lib/api/types/crate/customresourcedefinitionsObject.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)