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 3F0191FF150 for ; Mon, 06 Jul 2026 16:17:47 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 306EA2145C; Mon, 06 Jul 2026 16:17:46 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 06 Jul 2026 16:17:07 +0200 Message-Id: Subject: Re: [PATCH pve-manager v2 03/10] fix #7294: ui: pool: add SDN VNets as pool members From: "Daniel Kral" To: "David Riley" , X-Mailer: aerc 0.21.0-147-g43ac7b685014-dirty References: <20260626131035.112374-1-d.riley@proxmox.com> <20260626131035.112374-4-d.riley@proxmox.com> In-Reply-To: <20260626131035.112374-4-d.riley@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783347421408 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 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) 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: TC6FH63PKOXLDHARJZCOD2B77FQFRITR X-Message-ID-Hash: TC6FH63PKOXLDHARJZCOD2B77FQFRITR X-MailFrom: d.kral@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: On Fri Jun 26, 2026 at 3:10 PM CEST, David Riley wrote: > Add user interface to manage SDN VNets inside resource pools. > In the dialog window users can select an SDN zone, pick an associated > VNet, and optionally specify a VLAN tag. > > The VNet selector only shows VNets of the selected zone to prevent > invalid configurations. > > Link: https://bugzilla.proxmox.com/show_bug.cgi?id=3D7294 > Signed-off-by: David Riley > --- > www/css/ext6-pve.css | 15 ++++ > www/manager6/Utils.js | 1 + > www/manager6/grid/PoolMembers.js | 123 +++++++++++++++++++++++++++++++ > 3 files changed, 139 insertions(+) > > diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css > index 5c37dd29..3c383dfa 100644 > --- a/www/css/ext6-pve.css > +++ b/www/css/ext6-pve.css > @@ -464,6 +464,21 @@ div.right-aligned { > content: " "; > } > =20 > +.x-fa-pool-net:before { > + width: 14px; > + height: 14px; > + position: absolute; > + left: 1px; > + top: 1px; > + opacity: 0.45; > +} > + > +.x-fa-pool-net-grid:before { > + left: 14px; > + top: 6px; > + opacity: 0.65; > +} > + The patch message should contain the information from patch #4, which explains why there is an opacity applied here. > .x-fa-treepanel:before { > width: 16px; > height: 24px; > diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js > index 040b5ae0..8f53dfb6 100644 > --- a/www/manager6/Utils.js > +++ b/www/manager6/Utils.js > @@ -1322,6 +1322,7 @@ Ext.define('PVE.Utils', { > const networkTypeMapping =3D { > fabric: 'fa fa-road', > zone: 'fa fa-th', > + vnet: 'fa fa-network-wired x-fa-pool-net x-fa-pool-n= et-grid', > }; > =20 > return networkTypeMapping[record['network-type']] ?? ''; > diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMem= bers.js > index 69f50e30..5aaa2b71 100644 > --- a/www/manager6/grid/PoolMembers.js > +++ b/www/manager6/grid/PoolMembers.js > @@ -158,6 +158,108 @@ Ext.define('PVE.pool.AddStorage', { > }, > }); > =20 > +Ext.define('PVE.pool.AddVnet', { > + extend: 'Proxmox.window.Edit', > + > + viewModel: { > + data: { > + zone: '', > + }, > + formulas: { > + vnetDisabled: function (get) { > + return !get('zone'); > + }, > + }, > + }, > + > + initComponent: function () { > + let me =3D this; > + > + if (!me.pool) { > + throw 'no pool specified'; > + } > + > + me.isCreate =3D true; > + me.isAdd =3D true; > + me.url =3D '/pools/'; > + me.method =3D 'PUT'; > + me.extraRequestParams.poolid =3D me.pool; > + > + Ext.apply(me, { > + subject: gettext('VNet'), > + width: 350, > + items: [ > + { > + xtype: 'inputpanel', > + onGetValues: function (values) { > + let network =3D `zone=3D${values.zone},vnet=3D${= values.vnet}`; > + > + if (values.tag) { > + network +=3D `,tag=3D${values.tag}`; > + } > + > + delete values.zone; > + delete values.vnet; > + delete values.tag; > + > + values.network =3D network; > + > + return values; > + }, > + items: [ > + { > + xtype: 'pveSDNZoneSelector', > + fieldLabel: gettext('Zone'), > + name: 'zone', > + allowBlank: false, > + bind: { > + value: '{zone}', > + }, > + listeners: { > + change: function (_f, _value) { > + let vnetField =3D me.down('field[nam= e=3Dvnet]'); > + if (vnetField) { > + vnetField.setValue(''); > + } nit: might be nice to use a 'reference' on 'vnet' and then reference it here with lookupReference('vnet'), but no hard feelings. > + }, > + }, > + }, > + { > + xtype: 'pveSDNVnetSelector', > + fieldLabel: gettext('VNet'), > + name: 'vnet', > + allowBlank: false, > + bind: { > + disabled: '{vnetDisabled}', > + }, > + listeners: { > + beforequery: function (_queryPlan) { > + let zone =3D me.getViewModel().get('= zone'); > + let store =3D this.getStore(); > + store.clearFilter(); > + store.filter('zone', zone); > + return true; > + }, > + }, > + }, > + { > + xtype: 'proxmoxintegerfield', > + name: 'tag', > + fieldLabel: gettext('VLAN Tag'), > + minValue: 1, > + maxValue: 4094, > + allowBlank: true, > + emptyText: gettext('All'), > + }, > + ], > + }, > + ], > + }); > + > + me.callParent(); > + }, > +}); > + > Ext.define('PVE.grid.PoolMembers', { > extend: 'Ext.grid.GridPanel', > alias: ['widget.pvePoolMembers'], > @@ -223,6 +325,18 @@ Ext.define('PVE.grid.PoolMembers', { > rec.data.type =3D=3D=3D 'openvz' > ) { > params.vms =3D rec.data.vmid; > + } else if (rec.get('type') =3D=3D=3D 'network') { > + if (rec.get('network-type') =3D=3D=3D 'vnet') { > + let [_type, zone, vnet, tag] =3D rec.data.id.spl= it('/'); > + > + let network =3D `zone=3D${zone},vnet=3D${vnet}`; > + > + if (tag) { > + network +=3D `,tag=3D${tag}`; > + } > + > + params.network =3D network; > + } should maybe console.warn() or something similar if the network type is not recognized? > } else { > throw 'unknown resource type'; > } > @@ -268,6 +382,15 @@ Ext.define('PVE.grid.PoolMembers', { > win.show(); > }, > }, > + { > + text: gettext('VNet'), > + iconCls: 'fa fa-network-wired x-fa-pool-= net', > + handler: function () { > + let win =3D Ext.create('PVE.pool.Add= Vnet', { pool: me.pool }); > + win.on('destroy', reload); > + win.show(); > + }, > + }, > ], > }), > },