From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ui: resource mappings: fix editing of mapping for non first node
Date: Fri, 26 Apr 2024 09:17:24 +0200 [thread overview]
Message-ID: <20240426071724.1126646-1-d.csapak@proxmox.com> (raw)
when editing the pci mapping, we set the nodename of the pciselector
to the selected node. At the same time we disable and hide the node
selector, but it still changes it's value to the 'first' node
(alphabetically sorted) and that triggers a change event.
To prevent that we accidentally set the node of the pciselector
too, we need to check here if the field is disabled.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/window/PCIMapEdit.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/www/manager6/window/PCIMapEdit.js b/www/manager6/window/PCIMapEdit.js
index d43f04eb..faf58255 100644
--- a/www/manager6/window/PCIMapEdit.js
+++ b/www/manager6/window/PCIMapEdit.js
@@ -126,8 +126,10 @@ Ext.define('PVE.window.PCIMapEditWindow', {
this.lookup('pciselector').setMdev(value);
},
- nodeChange: function(_field, value) {
- this.lookup('pciselector').setNodename(value);
+ nodeChange: function(field, value) {
+ if (!field.isDisabled()) {
+ this.lookup('pciselector').setNodename(value);
+ }
},
pciChange: function(_field, value) {
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2024-04-26 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 7:17 Dominik Csapak [this message]
2024-07-24 9:44 ` Fiona Ebner
2024-07-26 8:06 ` Dominik Csapak
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=20240426071724.1126646-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