Skip to content

Commit 74a7a94

Browse files
committed
fix
1 parent 9fe2de1 commit 74a7a94

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/components/ComponentsSelection/ComponentsSelectionContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useMemo, useRef, useState } from 'react';
1+
import React, { useEffect, useMemo, useState } from 'react';
22
import { ComponentsSelection } from './ComponentsSelection.tsx';
33

44
import IllustratedError from '../Shared/IllustratedError.tsx';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ export const ControlPlane = (
8383
): Resource<ControlPlaneType> => {
8484
return {
8585
path: `/apis/core.openmcp.cloud/v1alpha1/namespaces/project-${projectName}--ws-${workspaceName}/managedcontrolplanes/${controlPlaneName}`,
86-
jq: '{ spec: .spec | {components}, status: { conditions: [.status.conditions[] | {type: .type, status: .status, message: .message, reason: .reason, lastTransitionTime: .lastTransitionTime}], access: .status.components.authentication.access, status: .status.status }}',
86+
jq: '{ spec: .spec | {components}, 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 }}',
8787
};
8888
};

src/spaces/mcp/pages/McpPage.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ import { isNotFoundError } from '../../../lib/api/error.ts';
2727
import { NotFoundBanner } from '../../../components/Ui/NotFoundBanner/NotFoundBanner.tsx';
2828
import Graph from '../../../components/Graphs/Graph.tsx';
2929
import HintsCardsRow from '../../../components/HintsCardsRow/HintsCardsRow.tsx';
30-
import { ControlPlaneCardMenu } from '../../../components/ControlPlanes/ControlPlaneCard/ControlPlaneCardMenu.tsx';
30+
3131
import { useState } from 'react';
3232
import { EditManagedControlPlaneWizardDataLoader } from '../../../components/Wizards/CreateManagedControlPlane/EditManagedControlPlaneWizardDataLoader.tsx';
33+
import { ControlPlanePageMenu } from '../../../components/ControlPlanes/ControlPlanePageMenu.tsx';
34+
import { DISPLAY_NAME_ANNOTATION } from '../../../lib/api/types/shared/keyNames.ts';
3335

3436
export default function McpPage() {
3537
const { projectName, workspaceName, controlPlaneName } = useParams();
@@ -40,7 +42,7 @@ export default function McpPage() {
4042
error,
4143
isLoading,
4244
} = useApiResource(ControlPlaneResource(projectName, workspaceName, controlPlaneName));
43-
45+
const displayName = mcp?.metadata?.annotations?.[DISPLAY_NAME_ANNOTATION];
4446
if (isLoading) {
4547
return <BusyIndicator active />;
4648
}
@@ -67,7 +69,7 @@ export default function McpPage() {
6769
preserveHeaderStateOnClick={true}
6870
titleArea={
6971
<ObjectPageTitle
70-
header={controlPlaneName}
72+
header={displayName ?? controlPlaneName}
7173
breadcrumbs={<BreadCrumbFeedbackHeader />}
7274
//TODO: actionBar should use Toolbar and ToolbarButton for consistent design
7375
actionsBar={
@@ -91,7 +93,7 @@ export default function McpPage() {
9193
resourceName={controlPlaneName}
9294
/>
9395
<CopyKubeconfigButton />
94-
<ControlPlaneCardMenu
96+
<ControlPlanePageMenu
9597
setIsEditManagedControlPlaneWizardOpen={setIsEditManagedControlPlaneWizardOpen}
9698
/>
9799
<EditManagedControlPlaneWizardDataLoader

0 commit comments

Comments
 (0)