mirror of https://github.com/portainer/portainer
22 lines
536 B
TypeScript
22 lines
536 B
TypeScript
import { openSwitchPrompt } from '@@/modals/SwitchPrompt';
|
|
import { ModalType } from '@@/modals';
|
|
import { buildConfirmButton } from '@@/modals/utils';
|
|
|
|
export async function confirmStackUpdate(
|
|
message: string,
|
|
defaultValue: boolean
|
|
) {
|
|
const result = await openSwitchPrompt(
|
|
'Are you sure?',
|
|
'Re-pull image and redeploy',
|
|
{
|
|
message,
|
|
confirmButton: buildConfirmButton('Update'),
|
|
modalType: ModalType.Warn,
|
|
defaultValue,
|
|
}
|
|
);
|
|
|
|
return result ? { pullImage: result.value } : undefined;
|
|
}
|