all lists on 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 3/4] ui: pci map edit: improve new host mappings dialog
Date: Mon, 19 Jun 2023 16:13:06 +0200	[thread overview]
Message-ID: <20230619141307.119430-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230619141307.119430-1-d.csapak@proxmox.com>

by disallowing nodes to be selected where a mapping already exists
and not preselecting a node

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





  parent reply	other threads:[~2023-06-19 14:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19 14:13 [pve-devel] [PATCH manager 1/4] ui: resource map tree: make 'ok' status clearer Dominik Csapak
2023-06-19 14:13 ` [pve-devel] [PATCH manager 2/4] ui: pci map edit: reintroduce warnings checks Dominik Csapak
2023-06-20 12:16   ` Fiona Ebner
2023-06-19 14:13 ` Dominik Csapak [this message]
2023-06-20 12:34   ` [pve-devel] [PATCH manager 3/4] ui: pci map edit: improve new host mappings dialog Fiona Ebner
2023-06-19 14:13 ` [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience Dominik Csapak
2023-06-20  9:35   ` Aaron Lauterer
2023-06-20  9:57     ` Dominik Csapak
2023-06-20 10:18       ` Aaron Lauterer
2023-06-20 10:48         ` Dominik Csapak
2023-06-20 13:25   ` Fiona Ebner
2023-06-20 14:13     ` 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=20230619141307.119430-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal