[pbs-devel] [PATCH proxmox-backup] ui: add 'keep configs' checkbox to datastore removal window

Dominik Csapak d.csapak at proxmox.com
Wed Nov 29 09:59:41 CET 2023


From: Hannes Laimer <h.laimer at proxmox.com>

... since the API already accepts a boolean for that.

Signed-off-by: Hannes Laimer <h.laimer at proxmox.com>
[ DC: actually send the option to the api ]
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
resent the old patch from hannes but added code to make it work,
hope thats ok @hannes

 www/datastore/OptionView.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js
index 448cd4b3..3ef4d3d5 100644
--- a/www/datastore/OptionView.js
+++ b/www/datastore/OptionView.js
@@ -34,7 +34,10 @@ Ext.define('PBS.window.SafeDatastoreDestroy', {
     getParams: function() {
 	let viewModel = this.getViewModel();
 
-	let params = { 'destroy-data': viewModel.get('destroyData') };
+	let params = {
+	    'destroy-data': viewModel.get('destroyData'),
+	    'keep-job-configs': viewModel.get('keepJobConfigs'),
+	};
 	return `?${Ext.Object.toQueryString(params)}`;
     },
     additionalItems: [{
@@ -45,6 +48,14 @@ Ext.define('PBS.window.SafeDatastoreDestroy', {
 	bind: {
 	    value: '{destroyData}',
 	},
+    }, {
+	xtype: 'proxmoxcheckbox',
+	name: 'keep-job-configs',
+	boxLabel: gettext("Keep configured jobs and permissions"),
+	defaultValue: false,
+	bind: {
+	    value: '{keepJobConfigs}',
+	},
     }, {
 	xtype: 'component',
 	reference: 'noteCmp',
-- 
2.30.2





More information about the pbs-devel mailing list