]> git.proxmox.com Git - proxmox-backup.git/commit - www/window/PruneJobEdit.js
ui: prune: fix sending invalid parameters
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 6 Mar 2024 11:21:02 +0000 (12:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 Mar 2024 09:30:40 +0000 (10:30 +0100)
commit169ddf541db119524e5229c243e0f1664df58ef6
tree11bc4ba5379c2740ea970d569d506e2d250f791e
parent3c8f974e88f8fd61dbcb8823ec3cd8f6f16626c0
ui: prune: fix sending invalid parameters

the prune input panel is used in various contexts (add/editing a
prunejob, adding a datastore, executing a prune). These different api
calls don't all take the same parameters, so we have to correctly set
the `isCreate` to not send a `delete` paramter for those request if
there was an empty field.

Also set 'max-depth:0' only when recursive was not set *and* we can
set 'recursive', because for creating a datastore that is not supported
by the api, and for the prune job editing we override the whole
onGetValues anyway so that's not an issue there.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/datastore/Content.js
www/panel/PrunePanel.js
www/window/PruneJobEdit.js