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 5D4051FF14F for ; Fri, 08 May 2026 18:40:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 40196200AF; Fri, 8 May 2026 18:40:59 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v6 20/24] ui: sdn: route maps: adapt to new route map api structure Date: Fri, 8 May 2026 18:31:29 +0200 Message-ID: <20260508163134.481912-21-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260508163134.481912-1-s.hanreich@proxmox.com> References: <20260508163134.481912-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778257795613 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.631 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 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: REMH3EFSIERM2WDVSIPZSR6U7RXUNOEQ X-Message-ID-Hash: REMH3EFSIERM2WDVSIPZSR6U7RXUNOEQ X-MailFrom: s.hanreich@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: Adapt the URLs here so they now use the new endpoints that have been moved around. Additionally a new endpoint has been introduced specifically to list route maps, so we do not need to transform the output from the api in the route map selector anymore. Signed-off-by: Stefan Hanreich --- www/manager6/sdn/RouteMapPanel.js | 10 +++++----- www/manager6/sdn/RouteMapSelector.js | 17 ----------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/www/manager6/sdn/RouteMapPanel.js b/www/manager6/sdn/RouteMapPanel.js index 5fa0475c3..8da030bb6 100644 --- a/www/manager6/sdn/RouteMapPanel.js +++ b/www/manager6/sdn/RouteMapPanel.js @@ -642,16 +642,16 @@ Ext.define('PVE.sdn.EditRouteMapEntryWindow', { loadUrl: function () { let me = this; - return `/api2/extjs/cluster/sdn/route-maps/${me.getRouteMapId()}/${me.getOrder()}`; + return `/api2/extjs/cluster/sdn/route-maps/entries/${me.getRouteMapId()}/entry/${me.getOrder()}`; }, submitUrl: function () { let me = this; if (me.isCreate) { - return '/api2/extjs/cluster/sdn/route-maps'; + return '/api2/extjs/cluster/sdn/route-maps/entries'; } else { - return `/api2/extjs/cluster/sdn/route-maps/${me.getRouteMapId()}/${me.getOrder()}`; + return `/api2/extjs/cluster/sdn/route-maps/entries/${me.getRouteMapId()}/entry/${me.getOrder()}`; } }, @@ -752,7 +752,7 @@ Ext.define('PVE.sdn.RouteMapPanel', { model: 'PVE.sdn.RouteMapEntry', proxy: { type: 'proxmox', - url: '/api2/extjs/cluster/sdn/route-maps?pending=1', + url: '/api2/extjs/cluster/sdn/route-maps/entries?pending=1&verbose=1', }, sorters: [ { @@ -821,7 +821,7 @@ Ext.define('PVE.sdn.RouteMapPanel', { } Proxmox.Async.api2({ - url: `/api2/extjs/cluster/sdn/route-maps/${entry.getRouteMapId()}/${entry.getOrder()}`, + url: `/api2/extjs/cluster/sdn/route-maps/entries/${entry.getRouteMapId()}/entry/${entry.getOrder()}`, method: 'DELETE', }) .catch(Proxmox.Utils.alertResponseFailure) diff --git a/www/manager6/sdn/RouteMapSelector.js b/www/manager6/sdn/RouteMapSelector.js index 3a2770798..94d278137 100644 --- a/www/manager6/sdn/RouteMapSelector.js +++ b/www/manager6/sdn/RouteMapSelector.js @@ -24,23 +24,6 @@ Ext.define('PVE.sdn.RouteMapSelector', { proxy: { type: 'proxmox', url: '/api2/json/cluster/sdn/route-maps', - reader: { - transform: { - fn: function (response) { - return Object.values( - response.data.reduce((accumulator, routeMapEntry) => { - let id = routeMapEntry['route-map-id']; - - accumulator[id] ??= { - id, - }; - - return accumulator; - }, {}), - ); - }, - }, - }, }, }, listConfig: { -- 2.47.3