public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1
Date: Tue, 9 Mar 2021 11:53:08 +0100	[thread overview]
Message-ID: <3215414e-9a3b-f5e9-8fb9-f8fe10b66a01@proxmox.com> (raw)
In-Reply-To: <1478058a-3d04-dd5a-d43f-94e9a58b84b8@proxmox.com>

On 09.03.21 11:28, Fabian Ebner wrote:
> On 05.03.21 21:34, Thomas Lamprecht wrote:
>> On 03.03.21 12:50, Fabian Ebner wrote:
>>> A user with Datastore.AllocateSpace, VM.Audit, VM.Backup can already 
>>> remove
>>> backups from the GUI manually, so it shouldn't be a problem if they 
>>> can set
>>> the remove flag when starting a manual backup in the GUI.
>>>
>>> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
>>> ---
>>>
>>> Changes from v1:
>>>      * Rebase on current master.
>>>      * Do not use the label 'Remove', because that is rather 
>>> confusing, instead
>>>        use 'Prune'.
>>>
>>>   www/manager6/window/Backup.js | 13 ++++++++++++-
>>>   1 file changed, 12 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/www/manager6/window/Backup.js 
>>> b/www/manager6/window/Backup.js
>>> index 615073f3..d5b585bb 100644
>>> --- a/www/manager6/window/Backup.js
>>> +++ b/www/manager6/window/Backup.js
>>> @@ -68,6 +68,17 @@ Ext.define('PVE.window.Backup', {
>>>               name: 'mailto',
>>>               emptyText: Proxmox.Utils.noneText,
>>>           },
>>> +        {
>>> +            xtype: 'proxmoxcheckbox',
>>> +            name: 'remove',
>>> +            checked: false,
>>> +            uncheckedValue: 0,
>>> +            fieldLabel: gettext('Prune'),
>>> +            autoEl: {
>>> +            tag: 'div',
>>> +            'data-qtip': gettext('Prune older backups afterwards'),
>>> +            },
>>> +        },
>>
>> I find this confusing in the case the storage has no prune settings 
>> configured and
>> also if there's one its intransparent as one cannot really tell which 
>> one.
>> So I'd maybe only enable (or show?) this if it can actually do 
>> something, and in
>> that case I'd also show the current settings (they could change in 
>> theory until
>> the job is submitted, but not the norm and still better than nothing).
>>
>>
> 
> I don't think there is an API call to GET the currently configured 
> vzdump properties yet. With that, we can set the other properties in the 
> manual backup window (mailto, compression, etc.) to their currently 
> configured values too. Also, if we pass along the previously retrieved 
> prune settings as an API param, there is no race.
> 

But the prune-backups parameter is restricted to root (maxfiles is too), 
so passing it along doesn't work for other users. Would it make sense to 
change that? One can already manually remove backups with 
Datastore.AllocateSpace and VM.Backup, so being able to set a 
(potentially) different prune-backups param doesn't seem to make a big 
difference to me. (Note, I don't say the user should be able to edit the 
prune-backups param in the manual backup UI.)

>>>           ],
>>>       });
>>> @@ -82,7 +93,7 @@ Ext.define('PVE.window.Backup', {
>>>               storage: storage,
>>>               vmid: me.vmid,
>>>               mode: values.mode,
>>> -            remove: 0,
>>> +            remove: values.remove,
>>>           };
>>>           if (values.mailto) {
>>>
>>
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




  reply	other threads:[~2021-03-09 10:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 11:50 [pve-devel] [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Fabian Ebner
2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 2/3] partially fix #2745: vzdump: use default for " Fabian Ebner
2021-03-05 20:34   ` [pve-devel] applied: " Thomas Lamprecht
2021-03-03 11:50 ` [pve-devel] [PATCH v2 manager 3/3] fix #2745: ui: backup: allow users to specify remove=1 Fabian Ebner
2021-03-05 20:34   ` Thomas Lamprecht
2021-03-09 10:28     ` Fabian Ebner
2021-03-09 10:53       ` Fabian Ebner [this message]
2021-03-05 20:34 ` [pve-devel] applied: [PATCH v2 guest-common 1/3] mention prune behavior for the remove parameter Thomas Lamprecht

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=3215414e-9a3b-f5e9-8fb9-f8fe10b66a01@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal