From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id EA61E1FF17E for ; Thu, 30 Oct 2025 16:50:14 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1FC3B27494; Thu, 30 Oct 2025 16:49:10 +0100 (CET) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Date: Thu, 30 Oct 2025 16:48:40 +0100 Message-ID: <20251030154851.540408-34-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251030154851.540408-1-s.hanreich@proxmox.com> References: <20251030154851.540408-1-s.hanreich@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.183 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH pve-manager 6/8] ui: sdn browser: Add ip-vrf panel for evpn zones X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" This panel shows the full state of the VRF of an EVPN zone on a given node. It is integrated into the SDN browser and only shown for EVPN zones. Signed-off-by: Stefan Hanreich --- www/manager6/Makefile | 1 + www/manager6/sdn/Browser.js | 11 ++++ www/manager6/sdn/EvpnZoneIpVrfPanel.js | 84 ++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 www/manager6/sdn/EvpnZoneIpVrfPanel.js diff --git a/www/manager6/Makefile b/www/manager6/Makefile index ba762578e..6abc77469 100644 --- a/www/manager6/Makefile +++ b/www/manager6/Makefile @@ -290,6 +290,7 @@ JSSRC= \ sdn/SubnetView.js \ sdn/ZoneContentView.js \ sdn/ZoneContentPanel.js \ + sdn/EvpnZoneIpVrfPanel.js \ sdn/FirewallPanel.js \ sdn/FirewallVnetView.js \ sdn/ZoneView.js \ diff --git a/www/manager6/sdn/Browser.js b/www/manager6/sdn/Browser.js index f7694ae91..d2e70f32a 100644 --- a/www/manager6/sdn/Browser.js +++ b/www/manager6/sdn/Browser.js @@ -48,6 +48,17 @@ Ext.define('PVE.sdn.Browser', { }); } + if (me.pveSelNode.data.zone_type && me.pveSelNode.data.zone_type === 'evpn') { + me.items.push({ + nodename: nodename, + zone: sdnId, + xtype: 'pveSDNEvpnZoneIpVrfPanel', + title: gettext('IP-VRF'), + iconCls: 'fa fa-th-list', + itemId: 'ip-vrf', + }); + } + me.callParent(); }, }); diff --git a/www/manager6/sdn/EvpnZoneIpVrfPanel.js b/www/manager6/sdn/EvpnZoneIpVrfPanel.js new file mode 100644 index 000000000..2b9ded537 --- /dev/null +++ b/www/manager6/sdn/EvpnZoneIpVrfPanel.js @@ -0,0 +1,84 @@ +Ext.define('IpVrfRoute', { + extend: 'Ext.data.Model', + fields: ['ip', 'metric', 'nexthops', 'protocol'], +}); + +Ext.define('PVE.sdn.EvpnZoneIpVrfPanel', { + extend: 'Ext.grid.GridPanel', + alias: 'widget.pveSDNEvpnZoneIpVrfPanel', + + title: gettext('IP-VRF'), + onlineHelp: 'pvesdn_zone_plugin_evpn', + + stateful: true, + stateId: 'grid-sdn-ip-vrf', + + columns: [ + { + text: gettext('CIDR'), + flex: 2, + sortable: true, + dataIndex: 'ip', + }, + { + text: gettext('Nexthop'), + flex: 3, + dataIndex: 'nexthops', + renderer: (value) => { + if (Ext.isArray(value)) { + return value.join('
'); + } + return value || ''; + }, + }, + { + text: gettext('Protocol'), + flex: 1, + sortable: true, + dataIndex: 'protocol', + }, + { + text: gettext('Metric'), + flex: 1, + sortable: true, + dataIndex: 'metric', + }, + ], + + initComponent: function () { + let me = this; + + let store = new Ext.data.Store({ + model: 'IpVrfRoute', + proxy: { + type: 'proxmox', + url: `/api2/json/nodes/${me.nodename}/sdn/zones/${me.zone}/ip-vrf`, + reader: { + type: 'json', + rootProperty: 'data', + }, + }, + sorters: [ + { + property: 'ip', + direction: 'ASC', + }, + { + property: 'nexthop', + direction: 'ASC', + }, + { + property: 'metric', + direction: 'ASC', + }, + ], + autoLoad: true, + }); + + Ext.apply(me, { + store, + }); + + me.callParent(); + }, +}); -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel