[pve-devel] [PATCH manager 1/2] fix #1000: add backup checkbox for mountpoints

Dominik Csapak d.csapak at proxmox.com
Wed May 18 15:55:20 CEST 2016


excluding bind mounts and rootfs

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/lxc/ResourceEdit.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index c5d29f0..fd731ef 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -225,6 +225,12 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 	    me.mpdata.acl = values.acl;
 	}
 
+	if (values.backup) {
+	    me.mpdata.backup = 1;
+	} else {
+	    delete me.mpdata.backup;
+	}
+
 	var res = {};
 	res[confid] = PVE.Parser.printLxcMountPoint(me.mpdata);
 	return res;
@@ -242,6 +248,7 @@ 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');
 	}
 
@@ -341,6 +348,7 @@ 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');
 			return;
 		    }
@@ -462,6 +470,14 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 	];
 
 	if (!isroot) {
+	    me.backup = Ext.createWidget('pvecheckbox',{
+		xtype: 'pvecheckbox',
+		name: 'backup',
+		fieldLabel: gettext('Backup')
+	    });
+	    if (me.mpdata.type !== 'bind') {
+		me.column2.push(me.backup);
+	    }
 	    me.column2.push({
 		xtype: 'textfield',
 		name: 'mp',
-- 
2.1.4





More information about the pve-devel mailing list