[pve-devel] [PATCH manager] gui: show 0 for max_relocate/restart correctly
Dominik Csapak
d.csapak at proxmox.com
Mon Jul 8 14:12:37 CEST 2019
0 || '1' will always return '1'
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/ha/Resources.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/www/manager6/ha/Resources.js b/www/manager6/ha/Resources.js
index 0b142c8d..bd6c337c 100644
--- a/www/manager6/ha/Resources.js
+++ b/www/manager6/ha/Resources.js
@@ -146,7 +146,10 @@ Ext.define('PVE.ha.ResourcesView', {
width: 100,
sortable: true,
renderer: function(v) {
- return v || '1';
+ if (v === undefined) {
+ return '1';
+ }
+ return v;
},
dataIndex: 'max_restart'
},
@@ -155,7 +158,10 @@ Ext.define('PVE.ha.ResourcesView', {
width: 100,
sortable: true,
renderer: function(v) {
- return v || '1';
+ if (v === undefined) {
+ return '1';
+ }
+ return v;
},
dataIndex: 'max_relocate'
},
--
2.20.1
More information about the pve-devel
mailing list