]> git.proxmox.com Git - pve-manager.git/commit
ui: resource mappings: fix editing of mapping for non first node
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 26 Jul 2024 07:40:17 +0000 (09:40 +0200)
committerFiona Ebner <f.ebner@proxmox.com>
Fri, 26 Jul 2024 09:08:07 +0000 (11:08 +0200)
commitfcf103ffd435cefa17e6cf0a9eec520716b314e2
treec2f9f3381a9c4b7b65d43781367c0791628b8492
parent876e531ad7e1d11240f94d833d363f604ed3d79c
ui: resource mappings: fix editing of mapping for non first node

when editing the pci mapping, we set the nodename of the pci/usbselector
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 pci/usbselector
too, we need to check here if the field is disabled.

There seems to be a race when loading the nodes for the nodeselector
which leads to inconsistent behaviour, so this was only encountered for
the pciselector, but theoretically it could also happen for the
usbselector so adding that condition to both.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/window/PCIMapEdit.js
www/manager6/window/USBMapEdit.js