[pve-devel] [PATCH manager v3 1/7] ui: lxc/MPEdit: add updateVMConfig

Dominik Csapak d.csapak at proxmox.com
Tue Oct 5 13:28:57 CEST 2021


helper for the upcoming MultiMPEdit

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

diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js
index 0e772017..64e57229 100644
--- a/www/manager6/lxc/MPEdit.js
+++ b/www/manager6/lxc/MPEdit.js
@@ -75,12 +75,18 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 	}
     },
 
-    setVMConfig: function(vmconfig) {
+    updateVMConfig: function(vmconfig) {
 	let me = this;
 	let vm = me.getViewModel();
 	me.vmconfig = vmconfig;
 	vm.set('unpriv', vmconfig.unprivileged);
+	me.down('field[name=mpid]').validate();
+    },
+
+    setVMConfig: function(vmconfig) {
+	let me = this;
 
+	me.updateVMConfig(vmconfig);
 	PVE.Utils.forEachMP((bus, i) => {
 	    let name = "mp" + i.toString();
 	    if (!Ext.isDefined(vmconfig[name])) {
-- 
2.30.2






More information about the pve-devel mailing list