fix(xo-web/home/VMs): do not delete VMs when confirm modal has been cancelled (#6435)
See Zammad#9735
Introduced by 11e09e1f87
This commit is contained in:
parent
74c8d56046
commit
4f9636b4c3
@ -24,6 +24,7 @@
|
||||
- [Tasks] Fix tasks being displayed for all users (PR [#6422](https://github.com/vatesfr/xen-orchestra/pull/6422))
|
||||
- [Storage/advanced] Fix the display of VDI to coalesce [#6334](https://xcp-ng.org/forum/topic/6334/coalesce-not-showing-anymore) (PR [#6429](https://github.com/vatesfr/xen-orchestra/pull/6429))
|
||||
- [Backup] Ignore disabled remotes instead of failing the execution [#6347](https://github.com/vatesfr/xen-orchestra/issues/6374) (PR [#6430](https://github.com/vatesfr/xen-orchestra/pull/6430))
|
||||
- [Home/VMs] Fix VMs being deleted despite clicking on Cancel in the bulk deletion modal (PR [#6435](https://github.com/vatesfr/xen-orchestra/pull/6435))
|
||||
|
||||
### Packages to release
|
||||
|
||||
|
@ -1618,14 +1618,18 @@ export const deleteVms = async vms => {
|
||||
if (vms.length === 1) {
|
||||
return deleteVm(vms[0])
|
||||
}
|
||||
await confirm({
|
||||
title: _('deleteVmsModalTitle', { vms: vms.length }),
|
||||
body: _('deleteVmsModalMessage', { vms: vms.length }),
|
||||
strongConfirm: vms.length > 1 && {
|
||||
messageId: 'deleteVmsConfirmText',
|
||||
values: { nVms: vms.length },
|
||||
},
|
||||
}).catch(noop)
|
||||
try {
|
||||
await confirm({
|
||||
title: _('deleteVmsModalTitle', { vms: vms.length }),
|
||||
body: _('deleteVmsModalMessage', { vms: vms.length }),
|
||||
strongConfirm: vms.length > 1 && {
|
||||
messageId: 'deleteVmsConfirmText',
|
||||
values: { nVms: vms.length },
|
||||
},
|
||||
})
|
||||
} catch (err) {
|
||||
return
|
||||
}
|
||||
|
||||
let nErrors = 0
|
||||
await Promise.all(
|
||||
|
Loading…
Reference in New Issue
Block a user