[pve-devel] [PATCH manager] ui: fix duplicate references when using multiple DiskStorageSelectors

Dominik Csapak d.csapak at proxmox.com
Tue Mar 21 14:27:11 CET 2023


by removing the references and change the one place where we used
one of the references.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
while i tested all places where we have a disk selector
(wizard, clone, efidisk, add hd) i am not super sure i found all uses
i grepped after the references, and only found one use where we used it
in a lookup/lookupReference, but maybe someone else too can check that
everything still works...


 www/manager6/form/DiskStorageSelector.js | 4 ----
 www/manager6/window/Clone.js             | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/www/manager6/form/DiskStorageSelector.js b/www/manager6/form/DiskStorageSelector.js
index abd46debc..860a3b3ca 100644
--- a/www/manager6/form/DiskStorageSelector.js
+++ b/www/manager6/form/DiskStorageSelector.js
@@ -118,7 +118,6 @@ Ext.define('PVE.form.DiskStorageSelector', {
 		xtype: 'pveStorageSelector',
 		itemId: 'hdstorage',
 		name: 'hdstorage',
-		reference: 'hdstorage',
 		fieldLabel: me.storageLabel,
 		nodename: me.nodename,
 		storageContent: me.storageContent,
@@ -136,7 +135,6 @@ Ext.define('PVE.form.DiskStorageSelector', {
 	    {
 		xtype: 'pveFileSelector',
 		name: 'hdimage',
-		reference: 'hdimage',
 		itemId: 'hdimage',
 		fieldLabel: gettext('Disk image'),
 		nodename: me.nodename,
@@ -146,7 +144,6 @@ Ext.define('PVE.form.DiskStorageSelector', {
 	    {
 		xtype: 'numberfield',
 		itemId: 'disksize',
-		reference: 'disksize',
 		name: 'disksize',
 		fieldLabel: gettext('Disk size') + ' (GiB)',
 		hidden: me.hideSize,
@@ -160,7 +157,6 @@ Ext.define('PVE.form.DiskStorageSelector', {
 	    {
 		xtype: 'pveDiskFormatSelector',
 		itemId: 'diskformat',
-		reference: 'diskformat',
 		name: 'diskformat',
 		fieldLabel: gettext('Format'),
 		nodename: me.nodename,
diff --git a/www/manager6/window/Clone.js b/www/manager6/window/Clone.js
index e94cd92dc..cab2339a9 100644
--- a/www/manager6/window/Clone.js
+++ b/www/manager6/window/Clone.js
@@ -170,7 +170,7 @@ Ext.define('PVE.window.Clone', {
 	    onlineValidator: true,
 	    listeners: {
 		change: function(f, value) {
-		    me.lookupReference('hdstorage').setTargetNode(value);
+		    me.lookup('diskselector').getComponent('hdstorage').setTargetNode(value);
 		},
 	    },
 	});
-- 
2.30.2






More information about the pve-devel mailing list