[pve-devel] [PATCH manager 3/4] ui: pci map edit: improve new host mappings dialog
Dominik Csapak
d.csapak at proxmox.com
Mon Jun 19 16:13:06 CEST 2023
by disallowing nodes to be selected where a mapping already exists
and not preselecting a node
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/window/PCIMapEdit.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/www/manager6/window/PCIMapEdit.js b/www/manager6/window/PCIMapEdit.js
index cd2dbfbe..0da2bae7 100644
--- a/www/manager6/window/PCIMapEdit.js
+++ b/www/manager6/window/PCIMapEdit.js
@@ -58,7 +58,13 @@ Ext.define('PVE.window.PCIMapEditWindow', {
let me = this;
let view = me.getView();
me.originalMap = [...values.map];
- values.map = PVE.Parser.filterPropertyStringList(values.map, (e) => e.node === view.nodename);
+ let configuredNodes = [];
+ values.map = PVE.Parser.filterPropertyStringList(values.map, (e) => {
+ configuredNodes.push(e.node);
+ return e.node === view.nodename;
+ });
+
+ me.lookup('nodeselector').disallowedNodes = configuredNodes;
return values;
},
@@ -201,6 +207,8 @@ Ext.define('PVE.window.PCIMapEditWindow', {
name: 'node',
editConfig: {
xtype: 'pveNodeSelector',
+ autoSelect: false,
+ reference: 'nodeselector',
},
cbind: {
editable: '{!nodename}',
--
2.30.2
More information about the pve-devel
mailing list