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 94F68614B0; Tue, 18 Aug 2020 10:43:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B7A4110D9A; Tue, 18 Aug 2020 10:43:19 +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 1773510D3B; Tue, 18 Aug 2020 10:43:18 +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 D3AA9430DC; Tue, 18 Aug 2020 10:43:17 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com Date: Tue, 18 Aug 2020 10:40:21 +0200 Message-Id: <20200818084023.54780-4-h.laimer@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200818084023.54780-1-h.laimer@proxmox.com> References: <20200818084023.54780-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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [item.id] Subject: [pbs-devel] [PATCH proxmox-widget-toolkit 3/5] ui: added possibility to show a small note in SafeRemove dialog X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 08:43:20 -0000 Signed-off-by: Hannes Laimer --- src/window/SafeRemove.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/window/SafeRemove.js b/src/window/SafeRemove.js index c541272..c3fc7dd 100644 --- a/src/window/SafeRemove.js +++ b/src/window/SafeRemove.js @@ -21,6 +21,7 @@ Ext.define('Proxmox.window.SafeRemove', { type: undefined }, url: undefined, + note: undefined, params: {} }, @@ -137,6 +138,22 @@ Ext.define('Proxmox.window.SafeRemove', { 'data-qtip': gettext('Wipe disk after the removal of mountpoint') } }, + { + xtype: 'container', + reference: 'noteContainer', + flex: 1, + layout: { + type: 'vbox', + align: 'middle' + }, + height: 25, + items: [ + { + xtype: 'component', + reference: 'noteCmp' + }, + ] + }, ] } ], @@ -163,8 +180,17 @@ Ext.define('Proxmox.window.SafeRemove', { } const messageCmp = me.lookupReference('messageCmp'); + const noteCmp = me.lookupReference('noteCmp'); let msg; + if (me.getNote() !== undefined) { + noteCmp.setHtml(`${me.getNote()}`); + } else { + const noteContainer = me.lookupReference('noteContainer'); + noteContainer.setDisabled(true); + noteContainer.setHidden(true); + } + if (item.type === 'VM') { msg = Proxmox.Utils.format_task_description('qmdestroy', item.id); } else if (item.type === 'CT') { @@ -173,6 +199,8 @@ Ext.define('Proxmox.window.SafeRemove', { msg = Proxmox.Utils.format_task_description('cephdestroypool', item.id); } else if (item.type === 'Image') { msg = Proxmox.Utils.format_task_description('unknownimgdel', item.id); + } else if (item.type === 'Dir') { + msg = `${gettext('Directory')} ${item.id} - ${gettext('Remove')}` } else { throw "unknown item type specified"; } -- 2.20.1