From 000d7e5b2f47d4958cc19eb20f63361a4b4c9226 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 15 Mar 2024 13:23:04 +0100 Subject: [PATCH] luci-mod-network: don't trigger uci save on removing bridge vlans Do not trigger a uci save operation on removing bridge VLANs as that might invalidate the ephemeral section ID of a just added network device. Fixes: #6990 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 61cef9baad6cf753d37bfa7fb7a661d26180f6b9) --- .../htdocs/luci-static/resources/tools/network.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index a6d6036063..71e5a6c860 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -920,6 +920,15 @@ return baseclass.extend({ }, this)); }; + ss.handleRemove = function(section_id) { + this.map.data.remove('network', section_id); + s.map.addedVLANs = s.map.addedVLANs.filter(function(sid) { + return sid != section_id; + }); + + return this.redraw(); + }; + o = ss.option(form.Value, 'vlan', _('VLAN ID')); o.datatype = 'range(1, 4094)'; -- 2.30.2