From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id E307461CEF; Tue, 15 Sep 2020 11:55:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D649718805; Tue, 15 Sep 2020 11:54:47 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6077C187DE; Tue, 15 Sep 2020 11:54:46 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1C0D544C38; Tue, 15 Sep 2020 11:54:46 +0200 (CEST) From: Hannes Laimer To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com Date: Tue, 15 Sep 2020 11:54:17 +0200 Message-Id: <20200915095420.990827-8-h.laimer@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200915095420.990827-1-h.laimer@proxmox.com> References: <20200915095420.990827-1-h.laimer@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH v4 pve-manager 7/10] safe-destroy: use SafeDestroy from proxmox-widget-toolkit X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2020 09:55:18 -0000 Signed-off-by: Hannes Laimer --- www/manager6/ceph/Pool.js | 5 +++-- www/manager6/lxc/Config.js | 5 +++-- www/manager6/qemu/Config.js | 5 +++-- www/manager6/storage/ContentView.js | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js index 19eb01e9..ef7c0914 100644 --- a/www/manager6/ceph/Pool.js +++ b/www/manager6/ceph/Pool.js @@ -229,13 +229,14 @@ Ext.define('PVE.node.CephPoolList', { var base_url = '/nodes/' + nodename + '/ceph/pools/' + rec.data.pool_name; - var win = Ext.create('PVE.window.SafeDestroy', { + var win = Ext.create('Proxmox.window.SafeDestroy', { showProgress: true, url: base_url, params: { remove_storages: 1 }, - item: { type: 'CephPool', id: rec.data.pool_name } + item: { id: rec.data.pool_name }, + taskName: 'cephdestroypool' }).show(); win.on('destroy', function() { rstore.load(); diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js index c2222d3a..bc5c82df 100644 --- a/www/manager6/lxc/Config.js +++ b/www/manager6/lxc/Config.js @@ -149,9 +149,10 @@ Ext.define('PVE.lxc.Config', { disabled: !caps.vms['VM.Allocate'], itemId: 'removeBtn', handler: function() { - Ext.create('PVE.window.SafeDestroy', { + Ext.create('Proxmox.window.SafeDestroy', { url: base_url, - item: { type: 'CT', id: vmid } + item: { id: vmid, purgeable: true }, + taskName: 'vzdestroy', }).show(); }, iconCls: 'fa fa-trash-o' diff --git a/www/manager6/qemu/Config.js b/www/manager6/qemu/Config.js index a13bf0c5..c3b244ab 100644 --- a/www/manager6/qemu/Config.js +++ b/www/manager6/qemu/Config.js @@ -124,9 +124,10 @@ Ext.define('PVE.qemu.Config', { itemId: 'removeBtn', disabled: !caps.vms['VM.Allocate'], handler: function() { - Ext.create('PVE.window.SafeDestroy', { + Ext.create('Proxmox.window.SafeDestroy', { url: base_url, - item: { type: 'VM', id: vmid } + item: { id: vmid, purgeable: true }, + taskName: 'qmdestroy' }).show(); }, iconCls: 'fa fa-trash-o' diff --git a/www/manager6/storage/ContentView.js b/www/manager6/storage/ContentView.js index 194ad42e..6680e711 100644 --- a/www/manager6/storage/ContentView.js +++ b/www/manager6/storage/ContentView.js @@ -485,11 +485,12 @@ Ext.define('PVE.storage.ContentView', { 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), showProgress: true, url: url, - item: { type: 'Image', id: vmid } + item: { id: vmid }, + taskName: 'unknownimgdel' }).show(); win.on('destroy', function() { me.statusStore = Ext.create('Proxmox.data.ObjectStore', { -- 2.20.1