Skip to content

Commit 55f6220

Browse files
authored
Merge branch 'main' into edit-mcp-improvements
2 parents b8d792e + 5187f80 commit 55f6220

File tree

17 files changed

+907
-820
lines changed

17 files changed

+907
-820
lines changed

package-lock.json

Lines changed: 624 additions & 613 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
"@fastify/static": "8.2.0",
3535
"@fastify/vite": "8.2.0",
3636
"@hookform/resolvers": "5.2.2",
37-
"@sentry/node": "10.11.0",
38-
"@sentry/react": "10.11.0",
37+
"@sentry/node": "10.13.0",
38+
"@sentry/react": "10.13.0",
3939
"@sentry/vite-plugin": "4.3.0",
4040
"@ui5/webcomponents": "2.14.0",
4141
"@ui5/webcomponents-fiori": "2.14.0",
4242
"@ui5/webcomponents-icons": "2.14.0",
4343
"@ui5/webcomponents-react": "2.14.1",
4444
"@ui5/webcomponents-react-charts": "2.14.1",
45-
"@xyflow/react": "12.8.4",
45+
"@xyflow/react": "12.8.5",
4646
"clsx": "2.1.1",
4747
"dagre": "0.8.5",
4848
"diff": "^8.0.2",
@@ -57,29 +57,29 @@
5757
"react": "19.1.1",
5858
"react-dom": "19.1.1",
5959
"react-error-boundary": "6.0.0",
60-
"react-hook-form": "7.62.0",
60+
"react-hook-form": "7.63.0",
6161
"react-i18next": "15.7.3",
6262
"react-router-dom": "7.9.1",
6363
"react-syntax-highlighter": "15.6.6",
6464
"react-time-ago": "7.3.5",
6565
"swr": "2.3.6",
6666
"yaml": "2.8.1",
67-
"zod": "4.1.8"
67+
"zod": "4.1.11"
6868
},
6969
"devDependencies": {
7070
"@eslint/eslintrc": "3.3.1",
71-
"@eslint/js": "9.35.0",
71+
"@eslint/js": "9.36.0",
7272
"@graphql-codegen/cli": "6.0.0",
73-
"@graphql-codegen/client-preset": "5.0.0",
73+
"@graphql-codegen/client-preset": "5.0.1",
7474
"@types/dagre": "0.7.53",
7575
"@types/js-yaml": "4.0.9",
76-
"@types/node": "22.18.3",
76+
"@types/node": "22.18.6",
7777
"@types/react": "19.1.13",
7878
"@types/react-dom": "19.1.9",
7979
"@types/react-syntax-highlighter": "15.5.13",
8080
"@ui5/webcomponents-cypress-commands": "2.14.1",
81-
"@vitejs/plugin-react": "5.0.2",
82-
"@vitest/eslint-plugin": "1.3.9",
81+
"@vitejs/plugin-react": "5.0.3",
82+
"@vitest/eslint-plugin": "1.3.12",
8383
"cypress": "15.2.0",
8484
"eslint-config-prettier": "10.1.8",
8585
"eslint-import-resolver-typescript": "4.4.4",
@@ -95,8 +95,8 @@
9595
"prettier": "3.6.2",
9696
"tsx": "4.20.5",
9797
"typescript": "5.9.2",
98-
"typescript-eslint": "8.43.0",
99-
"vite": "7.1.5",
98+
"typescript-eslint": "8.44.0",
99+
"vite": "7.1.7",
100100
"vitest": "3.2.4"
101101
}
102102
}

public/locales/en.json

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"signInButton": "Sign in"
77
},
88
"Entities": {
9-
"ManagedControlPlane": "Managed Control Plane",
9+
"ManagedControlPlane": "ManagedControlPlane",
1010
"Project": "Project",
1111
"Workspace": "Workspace",
1212
"Users": "Users",
@@ -89,8 +89,6 @@
8989
},
9090
"CopyKubeconfigButton": {
9191
"kubeconfigButton": "Kubeconfig",
92-
"copiedMessage": "Copied to Clipboard",
93-
"failedMessage": "Failed to copy, Error:",
9492
"menuDownload": "Download",
9593
"menuCopy": "Copy to clipboard"
9694
},
@@ -107,11 +105,8 @@
107105
"subtitleMessage": "Sorry, we couldn’t find what you are looking for.<br />The link may be incorrect or the {{entityType}} might have been removed.",
108106
"navigateHome": "Back to Homepage"
109107
},
110-
"IntelligentBreadcrumbs": {
111-
"homeLabel": "Home",
112-
"projects": "Projects",
113-
"workspaces": "Workspaces",
114-
"mcps": "MCPs"
108+
"PathAwareBreadcrumbs": {
109+
"projectsLabel": "Projects"
115110
},
116111
"MCPContext": {
117112
"errorMessage": "An unknown error occurred"
@@ -221,10 +216,6 @@
221216
"treeExecution": "Execution",
222217
"noExecutionFound": "No Executions found"
223218
},
224-
"CopyButton": {
225-
"copiedMessage": "Copied To Clipboard",
226-
"failedMessage": "Failed to copy"
227-
},
228219
"DeleteWorkspaceDialog": {
229220
"title": "Delete a Workspace",
230221
"introSection1": "The below instructions will help you delete the workspace \"{{workspaceName}}\" from project namespace \"{{projectNamespace}}\" using kubectl.",
@@ -358,7 +349,9 @@
358349
"unhealthy": "Unhealthy",
359350
"progress": "Managed",
360351
"remaining": "Remaining",
361-
"active": "Active"
352+
"active": "Active",
353+
"copyToClipboardSuccessToast": "Copied to clipboard",
354+
"copyToClipboardFailedToast": "Failed to copy to clipboard"
362355
},
363356
"errors": {
364357
"installError": "Install error",
@@ -378,7 +371,6 @@
378371
"update": "Update"
379372
},
380373
"yaml": {
381-
"copiedToClipboard": "YAML copied to clipboard!",
382374
"YAML": "File"
383375
},
384376
"createMCP": {

src/Routes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const Routes = {
2+
Home: '/',
3+
Project: '/mcp/projects/:projectName',
4+
Mcp: '/mcp/projects/:projectName/workspaces/:workspaceName/mcps/:controlPlaneName',
5+
} as const;

src/components/ControlPlanes/CopyKubeconfigButton.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Button, Menu, MenuItem } from '@ui5/webcomponents-react';
2-
import { useToast } from '../../context/ToastContext.tsx';
2+
import { useCopyToClipboard } from '../../hooks/useCopyToClipboard.ts';
33
import { useRef, useState } from 'react';
44
import '@ui5/webcomponents-icons/dist/copy';
55
import '@ui5/webcomponents-icons/dist/accept';
@@ -9,7 +9,7 @@ import { useTranslation } from 'react-i18next';
99
export default function CopyKubeconfigButton() {
1010
const popoverRef = useRef(null);
1111
const [open, setOpen] = useState(false);
12-
const { show } = useToast();
12+
const { copyToClipboard } = useCopyToClipboard();
1313
const { t } = useTranslation();
1414

1515
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -37,14 +37,7 @@ export default function CopyKubeconfigButton() {
3737
return;
3838
}
3939
if (event.detail.item.dataset.action === 'copy') {
40-
try {
41-
navigator.clipboard.writeText(mcp.kubeconfig ?? '');
42-
show(t('CopyKubeconfigButton.copiedMessage'));
43-
} catch (error) {
44-
//TODO: handle error, show error to user
45-
show(`${t('CopyKubeconfigButton.failedMessage')} ${error}`);
46-
console.error(error);
47-
}
40+
void copyToClipboard(mcp.kubeconfig ?? '');
4841
}
4942

5043
setOpen(false);
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { Button, FlexBox, FlexBoxAlignItems, Menu, MenuItem } from '@ui5/webcomponents-react';
2+
3+
import { useTranslation } from 'react-i18next';
4+
import { FeedbackButton } from './FeedbackButton.tsx';
5+
import { BetaButton } from './BetaButton.tsx';
6+
import { useRef, useState } from 'react';
7+
import { useAuthOnboarding } from '../../spaces/onboarding/auth/AuthContextOnboarding.tsx';
8+
import { SearchParamToggleVisibility } from '../Helper/FeatureToggleExistance.tsx';
9+
import { PathAwareBreadcrumbs } from './PathAwareBreadcrumbs/PathAwareBreadcrumbs.tsx';
10+
11+
export function BreadcrumbFeedbackHeader() {
12+
return (
13+
<FlexBox alignItems={FlexBoxAlignItems.Center}>
14+
<PathAwareBreadcrumbs />
15+
<BetaButton />
16+
<FeedbackButton />
17+
<SearchParamToggleVisibility
18+
shouldBeVisible={(params) => {
19+
if (params === undefined) return false;
20+
if (params.get('showHeaderBar') === null) return false;
21+
return params?.get('showHeaderBar') === 'false';
22+
}}
23+
>
24+
<LogoutMenu />
25+
</SearchParamToggleVisibility>
26+
</FlexBox>
27+
);
28+
}
29+
30+
function LogoutMenu() {
31+
const auth = useAuthOnboarding();
32+
const { t } = useTranslation();
33+
34+
const buttonRef = useRef(null);
35+
const [menuIsOpen, setMenuIsOpen] = useState(false);
36+
return (
37+
<>
38+
<Button
39+
ref={buttonRef}
40+
icon="menu2"
41+
onClick={() => {
42+
setMenuIsOpen(true);
43+
}}
44+
/>
45+
<Menu
46+
opener={buttonRef.current}
47+
open={menuIsOpen}
48+
onClose={() => {
49+
setMenuIsOpen(false);
50+
}}
51+
>
52+
<MenuItem
53+
icon="log"
54+
text={t('ShellBar.signOutButton')}
55+
onClick={async () => {
56+
setMenuIsOpen(false);
57+
await auth.logout();
58+
}}
59+
/>
60+
</Menu>
61+
</>
62+
);
63+
}

src/components/Core/IntelligentBreadcrumbs.tsx

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

src/components/Core/LandscapeLabel.tsx

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

0 commit comments

Comments
 (0)