[pve-devel] [PATCH manager] gui: qemu: fix min/max memory checks

Dominik Csapak d.csapak at proxmox.com
Tue Aug 20 14:50:04 CEST 2019


we need to set the minvalue for the memoryfield when setting the
'mininum memory', otherwise it is possible in the wizard to set
a higher minimum than maximum value

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/qemu/MemoryEdit.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/qemu/MemoryEdit.js b/www/manager6/qemu/MemoryEdit.js
index 4c4d1815..ab578bef 100644
--- a/www/manager6/qemu/MemoryEdit.js
+++ b/www/manager6/qemu/MemoryEdit.js
@@ -67,9 +67,11 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
 		allowBlank: false,
 		listeners: {
 		    change: function(f, value) {
-			var memory = me.down('field[name=memory]').getValue();
+			var memory = me.down('field[name=memory]');
 			var shares = me.down('field[name=shares]');
-			shares.setDisabled(value === memory);
+			shares.setDisabled(value === memory.getValue());
+			memory.setMinValue(value);
+			memory.validate();
 		    }
 		}
 	    },
-- 
2.20.1




More information about the pve-devel mailing list