[pve-devel] [PATCH manager 2/3] fix breaking gui when trying to edit a bindmount rootfs

Dominik Csapak d.csapak at proxmox.com
Tue Jul 11 14:39:19 CEST 2017


when having a simple directory as rootfs,
trying to edit it in the gui broke it, because
we tried to disable the backup checkbox which did not exists

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this is a very simple workaround
since this inputpanel has to be reworked entirely,
for now this should be ok
 www/manager6/lxc/ResourceEdit.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index dcf85f6e..c2e1f181 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -285,9 +285,11 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 	    me.quota.setDisabled(true);
 	    me.quota.setValue(false);
 	    me.acl.setDisabled(true);
-	    me.backup.setDisabled(true);
 	    me.acl.setValue('Default');
 	    me.hdstoragesel.setDisabled(true);
+	    if (me.confid !== 'rootfs') {
+		me.backup.setDisabled(true);
+	    }
 	}
 
 	if (mp.replicate) { // check box reverses the config option
@@ -391,8 +393,10 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 			me.quota.setDisabled(true);
 			me.quota.setValue(false);
 			me.acl.setDisabled(true);
-			me.backup.setDisabled(true);
 			me.acl.setValue('Default');
+			if (!isroot) {
+			    me.backup.setDisabled(true);
+			}
 			return;
 		    }
 		    var rec = f.store.getById(value);
-- 
2.11.0





More information about the pve-devel mailing list