public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager] ui: sdn: zone: delete removed static routes with the dedicated vrf
@ 2026-11-20 14:39 Gabriel Goller
  2026-11-21 20:58 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Goller @ 2026-11-20 14:39 UTC (permalink / raw)
  To: pve-devel; +Cc: Thomas Lamprecht

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 <t.lamprecht@proxmox.com>
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 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





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

* Re: [PATCH manager] ui: sdn: zone: delete removed static routes with the dedicated vrf
  2026-11-20 14:39 [PATCH manager] ui: sdn: zone: delete removed static routes with the dedicated vrf Gabriel Goller
@ 2026-11-21 20:58 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-11-21 20:58 UTC (permalink / raw)
  To: pve-devel, Gabriel Goller

On Fri, 20 Nov 2026 15:39:42 +0100, Gabriel Goller wrote:
> Removing all static routes and disabling the dedicated vrf in one edit
> failed, because the disabled routes grid did not send the deletion.
> 
> [...]

Applied, thanks!

Tested on a three-node cluster: removing the routes and disabling the
VRF in one edit works now. Only reworded the subject and code comment a
bit.

[1/1] ui: sdn: zone: delete removed static routes with the dedicated vrf
      commit: 44e37ce42c220c47eb0e9660c0c542227ea96e76




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

end of thread, other threads:[~2026-11-21 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 14:39 [PATCH manager] ui: sdn: zone: delete removed static routes with the dedicated vrf Gabriel Goller
2026-11-21 20:58 ` 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