diff --git a/public/locales/en.json b/public/locales/en.json index 8637500f..84fd6b20 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -47,6 +47,9 @@ "permissionErrorMessageSubtitle": "Ask a workspace admin to grant you access.", "loadingErrorMessage": "Failed to list mcps in workspace" }, + "ControlPlaneCard": { + "deleteConfirmationDialog": "MCP deletion triggered. The list will refresh automatically once completed." + }, "ControlPlaneListAllWorkspaces": { "emptyListTitleMessage": "No Workspaces created yet", "emptyListSubtitleMessage": "Create a workspace to get started" diff --git a/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx b/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx index 93c9de69..443bdb54 100644 --- a/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx +++ b/src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx @@ -6,6 +6,7 @@ import ConnectButton from '../ConnectButton.tsx'; import TitleLevel from '@ui5/webcomponents/dist/types/TitleLevel.js'; import { useState } from 'react'; +import { useTranslation } from 'react-i18next'; import { DeleteConfirmationDialog } from '../../Dialogs/DeleteConfirmationDialog.tsx'; import MCPHealthPopoverButton from '../../ControlPlane/MCPHealthPopoverButton.tsx'; @@ -23,7 +24,9 @@ import { PatchMCPResourceForDeletion, PatchMCPResourceForDeletionBody, } from '../../../lib/api/types/crate/deleteMCP.ts'; + import { YamlViewButton } from '../../Yaml/YamlViewButton.tsx'; +import { useToast } from '../../../context/ToastContext.tsx'; interface Props { controlPlane: ListControlPlanesType; @@ -37,6 +40,8 @@ export function ControlPlaneCard({ projectName, }: Props) { const [dialogDeleteMcpIsOpen, setDialogDeleteMcpIsOpen] = useState(false); + const toast = useToast(); + const { t } = useTranslation(); const { trigger: patchTrigger } = useApiResourceMutation( PatchMCPResourceForDeletion( @@ -122,6 +127,7 @@ export function ControlPlaneCard({ onDeletionConfirmed={async () => { await patchTrigger(PatchMCPResourceForDeletionBody); await deleteTrigger(); + toast.show(t('ControlPlaneCard.deleteConfirmationDialog')); }} />