public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pve-manager] ui: sdn: ipam: keep the subnets of different zones apart
@ 2026-11-19 19:46 Stefan Hanreich
  2026-11-19 23:16 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2026-11-19 19:46 UTC (permalink / raw)
  To: pve-devel

The IPAM tree grouped the entries by subnet alone. With the same subnet
in different zones, the entries of all these zones, including their
gateways, were shown in the subnet of the first zone.

Group the entries by zone and subnet, as the IPAM stores them.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 www/manager6/tree/DhcpTree.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/www/manager6/tree/DhcpTree.js b/www/manager6/tree/DhcpTree.js
index 40eb40bf..20f72d68 100644
--- a/www/manager6/tree/DhcpTree.js
+++ b/www/manager6/tree/DhcpTree.js
@@ -60,7 +60,9 @@ Ext.define('PVE.sdn.DhcpTree', {
                             zones[element.zone].children.push(vnet);
                         }
 
-                        if (!(element.subnet in subnets)) {
+                        // subnets of different zones can overlap
+                        let subnetKey = `${element.zone}/${element.subnet}`;
+                        if (!(subnetKey in subnets)) {
                             let subnet = {
                                 name: element.subnet,
                                 zone: element.zone,
@@ -71,14 +73,14 @@ Ext.define('PVE.sdn.DhcpTree', {
                                 children: [],
                             };
 
-                            subnets[element.subnet] = subnet;
+                            subnets[subnetKey] = subnet;
                             vnets[element.vnet].children.push(subnet);
                         }
 
                         element.name = element.vmid; // for sorting
                         element.type = 'mapping';
                         element.iconCls = 'x-tree-icon-none';
-                        subnets[element.subnet].children.push(element);
+                        subnets[subnetKey].children.push(element);
                     });
 
                     me.getView().setRootNode(root);
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 23:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 19:46 [PATCH pve-manager] ui: sdn: ipam: keep the subnets of different zones apart Stefan Hanreich
2026-11-19 23:16 ` applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal