Skip to content

Commit 9fe2de1

Browse files
committed
fix
1 parent 70e8bc0 commit 9fe2de1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { Infobox } from '../../Ui/Infobox/Infobox.tsx';
3030
import { ControlPlaneCardMenu } from './ControlPlaneCardMenu.tsx';
3131

3232
import { EditManagedControlPlaneWizardDataLoader } from '../../Wizards/CreateManagedControlPlane/EditManagedControlPlaneWizardDataLoader.tsx';
33+
import { DISPLAY_NAME_ANNOTATION } from '../../../lib/api/types/shared/keyNames.ts';
3334

3435
interface Props {
3536
controlPlane: ListControlPlanesType;
@@ -50,6 +51,8 @@ export function ControlPlaneCard({ controlPlane, workspace, projectName }: Props
5051
);
5152

5253
const name = controlPlane.metadata.name;
54+
const displayName = controlPlane?.metadata?.annotations?.[DISPLAY_NAME_ANNOTATION];
55+
console.log(controlPlane);
5356
const namespace = controlPlane.metadata.namespace;
5457

5558
const isSystemIdentityProviderEnabled = Boolean(controlPlane.spec?.authentication?.enableSystemIdentityProvider);
@@ -65,7 +68,7 @@ export function ControlPlaneCard({ controlPlane, workspace, projectName }: Props
6568
<FlexBox direction="Column">
6669
<FlexBox direction="Row" justifyContent="SpaceBetween">
6770
<FlexBox direction="Column">
68-
<Title level={TitleLevel.H5}>{name}</Title>
71+
<Title level={TitleLevel.H5}>{displayName ?? name}</Title>
6972
<Label>{workspace.metadata.name} </Label>
7073
</FlexBox>
7174
<div>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export type ListControlPlanesType = ControlPlaneType;
55
export interface Metadata {
66
name: string;
77
namespace: string;
8+
annotations: {
9+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
10+
[annotation: string]: any;
11+
};
812
}
913

1014
export interface ControlPlaneType {
@@ -68,7 +72,7 @@ export const ListControlPlanes = (
6872
projectName === null
6973
? null
7074
: `/apis/core.openmcp.cloud/v1alpha1/namespaces/project-${projectName}--ws-${workspaceName}/managedcontrolplanes`,
71-
jq: '[.items[] |{spec: .spec | {authentication}, metadata: .metadata | {name, namespace}, status: { conditions: [.status.conditions[] | {type: .type, status: .status, message: .message, reason: .reason, lastTransitionTime: .lastTransitionTime}], access: .status.components.authentication.access, status: .status.status } }]',
75+
jq: '[.items[] |{spec: .spec | {authentication}, metadata: .metadata | {name, namespace, annotations}, status: { conditions: [.status.conditions[] | {type: .type, status: .status, message: .message, reason: .reason, lastTransitionTime: .lastTransitionTime}], access: .status.components.authentication.access, status: .status.status } }]',
7276
};
7377
};
7478

0 commit comments

Comments
 (0)