From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id DFA951FF0E5 for ; Wed, 15 Jul 2026 13:49:28 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1961F213ED; Wed, 15 Jul 2026 13:49:28 +0200 (CEST) Message-ID: Date: Wed, 15 Jul 2026 13:48:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH pve-manager 1/1] fabrics: wireguard: node edit: use network selector To: Stefan Hanreich , pve-devel@lists.proxmox.com References: <20260617135814.427399-1-s.hanreich@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260617135814.427399-1-s.hanreich@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784116116600 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.329 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: KZV6KDW3A3KSIJIXCTLJRO24OV5RSIQN X-Message-ID-Hash: KZV6KDW3A3KSIJIXCTLJRO24OV5RSIQN X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: one comment inline, rest LGTM On 6/17/26 3:57 PM, Stefan Hanreich wrote: > For internal nodes, turn the endpoint form field into a network > selector that allows users to select IP addresses from a dropdown. > This makes the intention of the field clearer and also saves users > some typing since they can just select any configured IP on the node > without having to re-type it. > > The defaultFocus property is set for the node edit window, to avoid > the network selector getting autofocused which leads to an ugly, > mispositioned combogrid getting rendered automatically when the edit > window gets rendered initially. Focus on the form can still be gained > by pressing Tab an additional time. > > Suggested-by: Dominik Csapak > Signed-off-by: Stefan Hanreich > --- > .../sdn/fabrics/wireguard/NodeEdit.js | 38 ++++++++++++++++++- > 1 file changed, 36 insertions(+), 2 deletions(-) > > diff --git a/www/manager6/sdn/fabrics/wireguard/NodeEdit.js b/www/manager6/sdn/fabrics/wireguard/NodeEdit.js > index fe4639ade..f0d513162 100644 > --- a/www/manager6/sdn/fabrics/wireguard/NodeEdit.js > +++ b/www/manager6/sdn/fabrics/wireguard/NodeEdit.js > @@ -27,6 +27,8 @@ Ext.define('PVE.sdn.Fabric.WireGuard.Node.Edit', { > }, > }, > > + defaultFocus: 'no', > + > additionalItems: [ > { > xtype: 'proxmoxtextfield', > @@ -56,12 +58,37 @@ Ext.define('PVE.sdn.Fabric.WireGuard.Node.Edit', { > allowBlank: false, > }, > { > - xtype: 'proxmoxtextfield', > + // endpoint field for internal nodes > + xtype: 'proxmoxNetworkSelector', > + reference: 'networkSelector', > fieldLabel: gettext('Endpoint'), > emptyText: gettext('Host that peers connect to'), > labelWidth: 120, > name: 'endpoint', > - allowBlank: false, > + type: 'any_bridge', > + valueField: 'address', > + displayField: 'address', > + autoSelect: false, > + notFoundIsValid: true, > + editable: true, > + bind: { > + allowBlank: '{current.isPveNode}', > + hidden: '{!current.isPveNode}', > + disabled: '{!current.isPveNode}', allowBlank here is true when 'current.isPveNode' but that is the exact value when this field is shown and enabled. since allowBlank does not really do anything for disabled fields, why not simply have 'allowBlank: true' in the fields config? > + }, > + }, > + { > + // endpoint field for external nodes > + xtype: 'proxmoxtextfield', > + fieldLabel: gettext('Endpoint'), > + emptyText: gettext('Host that peers connect to qqq'), > + labelWidth: 120, > + name: 'endpoint', > + bind: { > + allowBlank: '{!current.isPveNode}', > + hidden: '{current.isPveNode}', > + disabled: '{current.isPveNode}', > + }, same principle here If wanted i can fix that up on applying though... > }, > { > xtype: 'proxmoxtextfield', > @@ -167,6 +194,13 @@ Ext.define('PVE.sdn.Fabric.WireGuard.Node.Edit', { > }, > }, > }, > + listeners: { > + change: function (_this, newValue) { > + if (me.getViewModel().get('current.isPveNode')) { > + me.lookupReference('networkSelector').setNodename(newValue); > + } > + }, > + }, > }); > > return config;