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 D336A61031 for ; Fri, 11 Sep 2020 13:08:55 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CFAD924246 for ; Fri, 11 Sep 2020 13:08:55 +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 4E38524239 for ; Fri, 11 Sep 2020 13:08:55 +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 19D7744B61 for ; Fri, 11 Sep 2020 13:08:55 +0200 (CEST) To: pbs-devel@lists.proxmox.com References: <20200828084658.22057-1-h.laimer@proxmox.com> <20200828084658.22057-10-h.laimer@proxmox.com> From: Dominik Csapak Message-ID: <8edbec45-e4d6-a64d-e15e-75139a9e4098@proxmox.com> Date: Fri, 11 Sep 2020 13:08:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Thunderbird/81.0 MIME-Version: 1.0 In-Reply-To: <20200828084658.22057-10-h.laimer@proxmox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 2.312 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -3.576 Looks like a legit reply (A) 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: Re: [pbs-devel] [PATCH v3 proxmox-backup 9/9] ui: add remove-button for directories/mount-units 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: Fri, 11 Sep 2020 11:08:55 -0000 comment inline On 8/28/20 10:46 AM, Hannes Laimer wrote: > Signed-off-by: Hannes Laimer > --- > add remove button to ui, all previous patches are needed for this one > > www/DirectoryList.js | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/www/DirectoryList.js b/www/DirectoryList.js > index 00531fd0..51b30c78 100644 > --- a/www/DirectoryList.js > +++ b/www/DirectoryList.js > @@ -21,6 +21,24 @@ Ext.define('PBS.admin.Directorylist', { > }).show(); > }, > > + removeDirectory: function() { > + let me = this; > + const view = me.getView(); > + const rec = view.getSelection()[0]; > + const id = rec.data.id; > + Ext.create('Proxmox.window.SafeDestroy', { > + url: `/nodes/localhost/disks/directory/${id}`, > + item: { > + id: id, > + }, > + note: gettext('Data and partitions on the disk will be left untouched.'), > + taskName: 'dirremove', > + listeners: { > + destroy: () => me.reload(), > + }, > + }).show(); > + }, > + > reload: function() { > let me = this; > let store = me.getView().getStore(); > @@ -49,6 +67,13 @@ Ext.define('PBS.admin.Directorylist', { > text: gettext('Create') + ': Directory', > handler: 'createDirectory', > }, > + { > + xtype: 'proxmoxButton', > + text: gettext('Remove'), > + handler: 'removeDir', the handler name is wrong and thus will not execute anything > + disabled: true, > + iconCls: 'fa fa-trash-o', > + }, > ], > > columns: [ >