diff options
author | Jo-Philipp Wich <jo@mein.io> | 2024-03-15 13:23:04 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2024-03-15 13:27:42 +0100 |
commit | 61cef9baad6cf753d37bfa7fb7a661d26180f6b9 (patch) | |
tree | 69292c6f2b4e28fb8d57f01dff5452cc00e37236 /modules/luci-mod-network/htdocs/luci-static | |
parent | 850345bfb90459a36b72ae45b0b7966ad1e7a6f6 (diff) |
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 <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js | 9 |
1 files changed, 9 insertions, 0 deletions
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 f823d69604..40ab9637b4 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 @@ -919,6 +919,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)'; |