From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 6A9DE1FF0AF for ; Fri, 20 Nov 2026 15:39:53 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 03C1D217B2; Fri, 20 Nov 2026 15:39:52 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH manager] ui: sdn: zone: delete removed static routes with the dedicated vrf Date: Fri, 20 Nov 2026 15:39:42 +0100 Message-ID: <20261120143944.219256-1-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795185588037 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.221 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_MED -2.3 Sender listed at https://www.dnswl.org/, medium 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: OH5SCD44QN3DXQY5FEFXXA4WH3EE2DXQ X-Message-ID-Hash: OH5SCD44QN3DXQY5FEFXXA4WH3EE2DXQ X-MailFrom: g.goller@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 CC: Thomas Lamprecht X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Removing all static routes and disabling the dedicated vrf in one edit failed, because the disabled routes grid did not send the deletion. Fixes: 284396bc70b7 ("ui: sdn: allow static routes for simple zone VRFs") Suggested-by: Thomas Lamprecht Signed-off-by: Gabriel Goller --- www/manager6/sdn/StaticRoutes.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/www/manager6/sdn/StaticRoutes.js b/www/manager6/sdn/StaticRoutes.js index 62e0be8c9182..880df39cfc4b 100644 --- a/www/manager6/sdn/StaticRoutes.js +++ b/www/manager6/sdn/StaticRoutes.js @@ -169,14 +169,23 @@ Ext.define('PVE.sdn.StaticRoutes', { getSubmitData: function () { let me = this; - if (me.disabled || !me.submitValue) { + if (!me.submitValue) { return null; } let value = me.getValue(); if (value.length) { - return { [me.getName()]: value }; + return me.disabled ? null : { [me.getName()]: value }; } - return me.isCreate ? null : { delete: me.getName() }; + if (me.isCreate) { + return null; + } + // The grid gets disabled together with the setting it depends on, e.g. the dedicated VRF + // of a zone. Still delete the routes removed in the same edit, the API rejects that setting + // change while routes are left. + if (me.disabled && !me.originalValue?.length) { + return null; + } + return { delete: me.getName() }; }, // The grid cannot show field errors itself. Proxmox.window.Edit marks the API errors on the -- 2.47.3