[pve-devel] [PATCH v10 manager 09/19] ui: HD edit: allow preselecting config ID
Fabian Ebner
f.ebner at proxmox.com
Wed Apr 6 10:04:06 CEST 2022
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
www/manager6/form/ControllerSelector.js | 4 ++++
www/manager6/qemu/HDEdit.js | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index 798dc4b2..cf68c952 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -116,6 +116,10 @@ Ext.define('PVE.form.ControllerSelector', {
if (me.selectFree) {
me.setVMConfig(me.vmconfig);
+ } else if (me.selectConfid) {
+ let [_, controller, deviceid] = me.selectConfid.match(/(\w+?)(\d+)/);
+ me.down('#controller').setValue(controller);
+ me.down('#deviceid').setValue(deviceid);
}
},
});
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index 3edc077d..76c281c7 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -191,7 +191,8 @@ Ext.define('PVE.qemu.HDInputPanel', {
if (!me.confid || me.unused) {
me.bussel = Ext.create('PVE.form.ControllerSelector', {
vmconfig: me.vmconfig,
- selectFree: true,
+ selectFree: !me.preSelectConfid,
+ selectConfid: me.preSelectConfid,
});
column1.push(me.bussel);
--
2.30.2
More information about the pve-devel
mailing list