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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BDFA17443B for ; Tue, 1 Jun 2021 16:38:12 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AA8B12B079 for ; Tue, 1 Jun 2021 16:37:42 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 1CB382B06B for ; Tue, 1 Jun 2021 16:37:42 +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 DF1FF439A2 for ; Tue, 1 Jun 2021 16:37:41 +0200 (CEST) Message-ID: <578707bb-62ed-5225-28e1-8fb3f78f682a@proxmox.com> Date: Tue, 1 Jun 2021 16:37:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Thunderbird/89.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Dominik Csapak References: <20210601121350.19919-1-d.csapak@proxmox.com> <20210601121350.19919-5-d.csapak@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210601121350.19919-5-d.csapak@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.321 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 -0.613 Looks like a legit reply (A) 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. [data.store] Subject: Re: [pbs-devel] [PATCH proxmox-backup 4/4] ui: DataStoreList: add remove button 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, 01 Jun 2021 14:38:12 -0000 On 01.06.21 14:13, Dominik Csapak wrote: > so that a user can remove a datastore from the gui, > though no data is deleted, this has to be done elsewhere (for now) > we could move that one to options, it's not a frequent operation and moving out of the probably more frequented views would seem reasonable. It'd put it there at the right of the tbar And we may want to consider adding a "purge data" opt-in checkbox in the long run (with some bells and whistles to ensure the user has feedback about the difference), as I do not really see the use-case for just removing it from the config happen that often in practice. > Signed-off-by: Dominik Csapak > --- > www/Utils.js | 1 + > www/datastore/DataStoreList.js | 39 ++++++++++++++++++++++++++++++++++ > 2 files changed, 40 insertions(+) > > diff --git a/www/Utils.js b/www/Utils.js > index f614d77e..6b378355 100644 > --- a/www/Utils.js > +++ b/www/Utils.js > @@ -380,6 +380,7 @@ Ext.define('PBS.Utils', { > backup: (type, id) => PBS.Utils.render_datastore_worker_id(id, gettext('Backup')), > 'barcode-label-media': [gettext('Drive'), gettext('Barcode-Label Media')], > 'catalog-media': [gettext('Drive'), gettext('Catalog Media')], > + 'delete-datastore': [gettext('Datastore'), gettext('Remove Datastore')], > dircreate: [gettext('Directory Storage'), gettext('Create')], > dirremove: [gettext('Directory'), gettext('Remove')], > 'eject-media': [gettext('Drive'), gettext('Eject Media')], > diff --git a/www/datastore/DataStoreList.js b/www/datastore/DataStoreList.js > index 353709d3..f81b25b7 100644 > --- a/www/datastore/DataStoreList.js > +++ b/www/datastore/DataStoreList.js > @@ -113,11 +113,50 @@ Ext.define('PBS.datastore.DataStoreList', { > > me.datastores[data.store] = me.insert(i, { > datastore: data.store, > + header: { > + padding: '6 6 7 9', > + }, > + tools: [ > + { > + xtype: 'button', > + text: gettext('Remove'), > + iconCls: 'fa fa-trash-o', > + handler: () => me.removeDatastore(data.store), > + padding: 2, > + }, > + ], > }); > me.datastores[data.store].setStatus(data); > me.datastores[data.store].setTasks(me.tasks[data.store], me.since); > }, > > + removeDatastore: function(datastore) { > + let me = this; > + Ext.create('Proxmox.window.SafeDestroy', { > + url: `/config/datastore/${datastore}`, > + item: { > + id: datastore, > + }, > + note: gettext('Configuration change only, no data will be deleted.'), > + autoShow: true, > + taskName: 'delete-datastore', > + listeners: { > + destroy: () => { > + me.reload(); > + let navtree = Ext.ComponentQuery.query('navigationtree')[0]; > + navtree.rstore.load(); > + }, > + }, > + }); > + }, > + > + reload: function() { > + let me = this; > + me.mask(); > + me.usageStore.load(); > + me.taskStore.load(); > + }, > + > initComponent: function() { > let me = this; > me.items = [ >