From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: [pbs-devel] applied: [PATCH proxmox-backup v2 4/4] ui: DataStoreList: add remove button
Date: Fri, 4 Jun 2021 09:52:33 +0200 [thread overview]
Message-ID: <0fc40de7-808c-1c43-79af-638545c4f2be@proxmox.com> (raw)
In-Reply-To: <20210602112704.893-5-d.csapak@proxmox.com>
applied
On 6/2/21 1:27 PM, 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)
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> www/Utils.js | 1 +
> www/datastore/OptionView.js | 30 ++++++++++++++++++++++++++++++
> 2 files changed, 31 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/OptionView.js b/www/datastore/OptionView.js
> index 723730fd..98152dce 100644
> --- a/www/datastore/OptionView.js
> +++ b/www/datastore/OptionView.js
> @@ -21,6 +21,28 @@ Ext.define('PBS.Datastore.Options', {
> edit: function() {
> this.getView().run_editor();
> },
> +
> + removeDatastore: function() {
> + let me = this;
> + let datastore = me.getView().datastore;
> + 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: () => {
> + let navtree = Ext.ComponentQuery.query('navigationtree')[0];
> + navtree.rstore.load();
> + let mainview = me.getView().up('mainview');
> + mainview.getController().redirectTo('pbsDataStores');
> + },
> + },
> + });
> + },
> },
>
> tbar: [
> @@ -30,6 +52,14 @@ Ext.define('PBS.Datastore.Options', {
> disabled: true,
> handler: 'edit',
> },
> + '->',
> + {
> + xtype: 'proxmoxButton',
> + selModel: null,
> + iconCls: 'fa fa-trash-o',
> + text: gettext('Remove Datastore'),
> + handler: 'removeDatastore',
> + },
> ],
>
> listeners: {
prev parent reply other threads:[~2021-06-04 7:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 11:27 [pbs-devel] [PATCH proxmox-backup v2 0/4] improve datastore removal/creation Dominik Csapak
2021-06-02 11:27 ` [pbs-devel] [PATCH proxmox-backup v2 1/4] proxmox-backup-proxy: fix leftover references on datastore removal Dominik Csapak
2021-06-04 6:24 ` Dietmar Maurer
2021-06-02 11:27 ` [pbs-devel] [PATCH proxmox-backup v2 2/4] api2/config/datastore: change create datastore api call to a worker Dominik Csapak
2021-06-04 7:07 ` [pbs-devel] applied: " Dietmar Maurer
2021-06-02 11:27 ` [pbs-devel] [PATCH proxmox-backup v2 3/4] backup/chunk_store: optionally log progress on creation Dominik Csapak
2021-06-04 7:40 ` [pbs-devel] applied: " Dietmar Maurer
2021-06-02 11:27 ` [pbs-devel] [PATCH proxmox-backup v2 4/4] ui: DataStoreList: add remove button Dominik Csapak
2021-06-04 7:52 ` Dietmar Maurer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0fc40de7-808c-1c43-79af-638545c4f2be@proxmox.com \
--to=dietmar@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox