ui: use safe destroy window from proxmox-widget-toolkit

for the remaining (i.e. non-guests) users.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-04-19 15:14:40 +02:00 committed by Thomas Lamprecht
parent 94d2359b78
commit b9635c9b99
2 changed files with 4 additions and 2 deletions

View File

@ -407,7 +407,7 @@ Ext.define('PVE.node.CephPoolList', {
return; return;
} }
let poolName = rec.data.pool_name; let poolName = rec.data.pool_name;
Ext.create('PVE.window.SafeDestroy', { Ext.create('Proxmox.window.SafeDestroy', {
showProgress: true, showProgress: true,
url: `/nodes/${nodename}/ceph/pools/${poolName}`, url: `/nodes/${nodename}/ceph/pools/${poolName}`,
params: { params: {
@ -417,6 +417,7 @@ Ext.define('PVE.node.CephPoolList', {
type: 'CephPool', type: 'CephPool',
id: poolName, id: poolName,
}, },
taskName: 'cephdestroypool',
autoShow: true, autoShow: true,
listeners: { listeners: {
destroy: () => rstore.load(), destroy: () => rstore.load(),

View File

@ -57,11 +57,12 @@ Ext.define('PVE.storage.ImageView', {
return; return;
} }
} }
var win = Ext.create('PVE.window.SafeDestroy', { var win = Ext.create('Proxmox.window.SafeDestroy', {
title: Ext.String.format(gettext("Destroy '{0}'"), rec.data.volid), title: Ext.String.format(gettext("Destroy '{0}'"), rec.data.volid),
showProgress: true, showProgress: true,
url: url, url: url,
item: { type: 'Image', id: vmid }, item: { type: 'Image', id: vmid },
taskName: 'unknownimgdel',
}).show(); }).show();
win.on('destroy', reload); win.on('destroy', reload);
}, },