* [PATCH manager] ui: sdn: zone: delete removed static routes with the dedicated vrf
@ 2026-11-20 14:39 Gabriel Goller
0 siblings, 0 replies; only message 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] only message in thread
only message in thread, other threads:[~2026-11-20 14:39 UTC | newest]
Thread overview: (only message) (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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox