2023-02-14 08:19:41 +00:00
|
|
|
import { ModalType } from '@@/modals';
|
|
|
|
import { openSwitchPrompt } from '@@/modals/SwitchPrompt';
|
|
|
|
import { buildConfirmButton } from '@@/modals/utils';
|
|
|
|
|
|
|
|
export async function confirmContainerDeletion(title: string) {
|
|
|
|
const result = await openSwitchPrompt(
|
|
|
|
title,
|
|
|
|
'Automatically remove non-persistent volumes',
|
|
|
|
{
|
|
|
|
confirmButton: buildConfirmButton('Remove', 'danger'),
|
|
|
|
modalType: ModalType.Destructive,
|
2024-04-11 00:11:38 +00:00
|
|
|
'data-cy': 'confirm-container-delete-button',
|
2023-02-14 08:19:41 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
return result ? { removeVolumes: result.value } : undefined;
|
|
|
|
}
|