Skip to content

Commit 4b49429

Browse files
committed
Delete MCP toast trigger
1 parent f0d316b commit 4b49429

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

public/locales/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
"permissionErrorMessageSubtitle": "Ask a workspace admin to grant you access.",
4848
"loadingErrorMessage": "Failed to list mcps in workspace"
4949
},
50+
"ControlPlaneCard": {
51+
"deleteConfirmationDialog": "MCP deletion triggered. The list will refresh automatically once completed."
52+
},
5053
"ControlPlaneListAllWorkspaces": {
5154
"emptyListTitleMessage": "No Workspaces created yet",
5255
"emptyListSubtitleMessage": "Create a workspace to get started"

src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import { DeleteConfirmationDialog } from '../../Dialogs/DeleteConfirmationDialog
2222
import MCPHealthPopoverButton from '../../ControlPlane/MCPHealthPopoverButton.tsx';
2323
import styles from './ControlPlaneCard.module.css';
2424
import { KubectlDeleteMcp } from '../../Dialogs/KubectlCommandInfo/Controllers/KubectlDeleteMcp.tsx';
25+
import { useToast } from '../../../context/ToastContext.tsx';
26+
import { useTranslation } from 'react-i18next';
2527

2628
interface Props {
2729
controlPlane: ListControlPlanesType;
@@ -35,6 +37,8 @@ export function ControlPlaneCard({
3537
projectName,
3638
}: Props) {
3739
const [dialogDeleteMcpIsOpen, setDialogDeleteMcpIsOpen] = useState(false);
40+
const toast = useToast();
41+
const { t } = useTranslation();
3842

3943
const { trigger: patchTrigger } = useApiResourceMutation<DeleteMCPType>(
4044
PatchMCPResourceForDeletion(
@@ -109,6 +113,7 @@ export function ControlPlaneCard({
109113
onDeletionConfirmed={async () => {
110114
await patchTrigger(PatchMCPResourceForDeletionBody);
111115
await deleteTrigger();
116+
toast.show(t('ControlPlaneCard.deleteConfirmationDialog'));
112117
}}
113118
/>
114119
</>

0 commit comments

Comments
 (0)