From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Thomas Lamprecht <t.lamprecht@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 [thread overview]
Message-ID: <20261120143944.219256-1-g.goller@proxmox.com> (raw)
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
reply other threads:[~2026-11-20 14:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261120143944.219256-1-g.goller@proxmox.com \
--to=g.goller@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.