[pve-devel] [PATCH v10 manager 08/19] ui: multi disk edit: only pass confid for addPanel

Fabian Ebner f.ebner at proxmox.com
Wed Apr 6 10:04:05 CEST 2022


in preparation to allow pre-selecting a config ID.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 www/manager6/lxc/MultiMPEdit.js     | 4 ++--
 www/manager6/panel/MultiDiskEdit.js | 4 ++--
 www/manager6/qemu/MultiHDEdit.js    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/manager6/lxc/MultiMPEdit.js b/www/manager6/lxc/MultiMPEdit.js
index 709dacb1..7310ad05 100644
--- a/www/manager6/lxc/MultiMPEdit.js
+++ b/www/manager6/lxc/MultiMPEdit.js
@@ -30,14 +30,14 @@ Ext.define('PVE.lxc.MultiMPPanel', {
 	    return nextFreeDisk;
 	},
 
-	addPanel: function(itemId, vmconfig, nextFreeDisk) {
+	addPanel: function(itemId, vmconfig, confid) {
 	    let me = this;
 	    return me.getView().add({
 		vmconfig,
 		border: false,
 		showAdvanced: Ext.state.Manager.getProvider().get('proxmox-advanced-cb'),
 		xtype: 'pveLxcMountPointInputPanel',
-		confid: nextFreeDisk.confid === 'rootfs' ? 'rootfs' : null,
+		confid: confid === 'rootfs' ? 'rootfs' : null,
 		bind: {
 		    nodename: '{nodename}',
 		    unprivileged: '{unprivileged}',
diff --git a/www/manager6/panel/MultiDiskEdit.js b/www/manager6/panel/MultiDiskEdit.js
index ea1f974d..c1fd0617 100644
--- a/www/manager6/panel/MultiDiskEdit.js
+++ b/www/manager6/panel/MultiDiskEdit.js
@@ -27,7 +27,7 @@ Ext.define('PVE.panel.MultiDiskPanel', {
 	    throw "implement in subclass";
 	},
 
-	addPanel: function(itemId, vmconfig, nextFreeDisk) {
+	addPanel: function(itemId, vmconfig, confid) {
 	    throw "implement in subclass";
 	},
 
@@ -53,7 +53,7 @@ Ext.define('PVE.panel.MultiDiskPanel', {
 		itemId,
 	    })[0];
 
-	    let panel = me.addPanel(itemId, vmconfig, nextFreeDisk);
+	    let panel = me.addPanel(itemId, vmconfig, nextFreeDisk.confid);
 	    panel.updateVMConfig(vmconfig);
 
 	    // we need to setup a validitychange handler, so that we can show
diff --git a/www/manager6/qemu/MultiHDEdit.js b/www/manager6/qemu/MultiHDEdit.js
index caf74fad..b2e8141e 100644
--- a/www/manager6/qemu/MultiHDEdit.js
+++ b/www/manager6/qemu/MultiHDEdit.js
@@ -16,7 +16,7 @@ Ext.define('PVE.qemu.MultiHDPanel', {
 	    return PVE.Utils.nextFreeDisk(clist, vmconfig);
 	},
 
-	addPanel: function(itemId, vmconfig, nextFreeDisk) {
+	addPanel: function(itemId, vmconfig, confid) {
 	    let me = this;
 	    return me.getView().add({
 		vmconfig,
-- 
2.30.2






More information about the pve-devel mailing list