[pve-devel] [PATCH manager] fix #1196: make restriced/nofailback boolean in gui

Dominik Csapak d.csapak at proxmox.com
Mon Nov 7 12:05:06 CET 2016


since we get the string "0" from the backend if the line is in the
groups.cfg, we have to set the field to type boolean, or the string will
always be interpreted as true

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
the real bug is that we get the string "0" instead of a number,
but it also makes sense to fix it here (and in the backend later)
 www/manager6/ha/GroupSelector.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/www/manager6/ha/GroupSelector.js b/www/manager6/ha/GroupSelector.js
index eb37b0e..7487739 100644
--- a/www/manager6/ha/GroupSelector.js
+++ b/www/manager6/ha/GroupSelector.js
@@ -47,8 +47,15 @@ Ext.define('PVE.ha.GroupSelector', {
     Ext.define('pve-ha-groups', {
 	extend: 'Ext.data.Model',
 	fields: [ 
-	    'group', 'type', 'restricted', 'digest', 'nofailback',
-	    'nodes', 'comment'
+	    'group', 'type', 'digest', 'nodes', 'comment',
+	    {
+		name : 'restricted',
+		type: 'boolean'
+	    },
+	    {
+		name : 'nofailback',
+		type: 'boolean'
+	    }
 	],
 	proxy: {
             type: 'pve',
-- 
2.1.4





More information about the pve-devel mailing list