[pbs-devel] [RFC v2 proxmox-backup 21/21] ui: allow to skip trash on namespace deletion
Christian Ebner
c.ebner at proxmox.com
Thu May 8 15:05:55 CEST 2025
In order to bypass the trash, add a check box to the delete namespace
dialog and set the `skip-trash` api call parameter accordingly.
Also, extend the warning to mention that when the trash is skipped,
also already trashed items in the namespace are removed permanently.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
www/window/NamespaceEdit.js | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/www/window/NamespaceEdit.js b/www/window/NamespaceEdit.js
index a9a440bbf..79a045823 100644
--- a/www/window/NamespaceEdit.js
+++ b/www/window/NamespaceEdit.js
@@ -83,11 +83,30 @@ Ext.define('PBS.window.NamespaceDelete', {
},
},
},
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'skip-trash',
+ boxLabel: gettext('Skip Trash (delete content immediately)'),
+ value: false,
+ listeners: {
+ change: function(field, value) {
+ let win = field.up('proxmoxSafeDestroy');
+ if (value) {
+ win.params['skip-trash'] = value;
+ } else {
+ delete win.params['skip-trash'];
+ }
+ },
+ },
+ bind: {
+ disabled: '{!rmGroups.checked}',
+ },
+ },
{
xtype: 'box',
padding: '5 0 0 0',
html: `<span class="pmx-hint">${gettext('Note')}</span>: `
- + gettext('This will permanently remove all backups from the current namespace and all namespaces below it!'),
+ + gettext('This will remove all backups from the current namespace and all namespaces below it! If the trash is skipped, this will remove also previously trashed items'),
bind: {
hidden: '{!rmGroups.checked}',
},
--
2.39.5
More information about the pbs-devel
mailing list