From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <f.ebner@proxmox.com> 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 EB798749C3 for <pve-devel@lists.proxmox.com>; Mon, 19 Apr 2021 15:14:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E3DFD16266 for <pve-devel@lists.proxmox.com>; Mon, 19 Apr 2021 15:14:50 +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 3001816233 for <pve-devel@lists.proxmox.com>; Mon, 19 Apr 2021 15:14: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 E3E5C45B8F for <pve-devel@lists.proxmox.com>; Mon, 19 Apr 2021 15:14:45 +0200 (CEST) From: Fabian Ebner <f.ebner@proxmox.com> To: pve-devel@lists.proxmox.com Date: Mon, 19 Apr 2021 15:14:37 +0200 Message-Id: <20210419131441.23650-4-f.ebner@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419131441.23650-1-f.ebner@proxmox.com> References: <20210419131441.23650-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.007 Adjusted score from AWL reputation of From: address 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 manager 3/7] ui: add SafeDestroyGuest window X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> X-List-Received-Date: Mon, 19 Apr 2021 13:14:51 -0000 The purge parameter is always explicitly set, which is different from the existing behavior, but it does not rely on what the default in the backend is. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> --- Dependency bump for proxmox-widget-toolkit is needed. www/manager6/Makefile | 1 + www/manager6/window/SafeDestroyGuest.js | 30 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 www/manager6/window/SafeDestroyGuest.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index a2f7be6d..6fc4cde5 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -100,6 +100,7 @@ JSSRC= \ window/Prune.js \ window/Restore.js \ window/SafeDestroy.js \ + window/SafeDestroyGuest.js \ window/Settings.js \ window/Snapshot.js \ window/StartupEdit.js \ diff --git a/www/manager6/window/SafeDestroyGuest.js b/www/manager6/window/SafeDestroyGuest.js new file mode 100644 index 00000000..d6121594 --- /dev/null +++ b/www/manager6/window/SafeDestroyGuest.js @@ -0,0 +1,30 @@ +/* + * SafeDestroy window with additional checkboxes for removing guests + */ +Ext.define('PVE.window.SafeDestroyGuest', { + extend: 'Proxmox.window.SafeDestroy', + alias: 'proxmoxSafeDestroy', + + additionalItems: [ + { + xtype: 'proxmoxcheckbox', + name: 'purge', + reference: 'purgeCheckbox', + boxLabel: gettext('Purge'), + checked: false, + autoEl: { + tag: 'div', + 'data-qtip': gettext('Remove from replication and backup jobs'), + }, + }, + ], + + getParams: function() { + let me = this; + + const purgeCheckbox = me.lookupReference('purgeCheckbox'); + me.params.purge = purgeCheckbox.checked ? 1 : 0; + + return me.callParent(); + }, +}); -- 2.20.1