public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: fix duplicate references when using multiple DiskStorageSelectors
Date: Tue, 21 Mar 2023 14:27:11 +0100	[thread overview]
Message-ID: <20230321132711.3377257-1-d.csapak@proxmox.com> (raw)

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

Signed-off-by: Dominik Csapak <d.csapak@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





             reply	other threads:[~2023-03-21 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 13:27 Dominik Csapak [this message]
2023-06-06 15:09 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230321132711.3377257-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal