diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-01 08:54:06 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-01 08:54:58 +0100 |
commit | 49ecaf60902be2e43ccec3c61bc6b7d0b41da251 (patch) | |
tree | 3376d16d4799678dc475975a7c34e32617012764 /modules/luci-base/htdocs/luci-static | |
parent | 79d9449bbda62a1e9238a2b150d8497610cf4f88 (diff) |
luci-base: firewall.js: manage zomne networks as list
Fixes: #4827
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/firewall.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/firewall.js b/modules/luci-base/htdocs/luci-static/resources/firewall.js index 2e032ca2d5..4fa4954ba6 100644 --- a/modules/luci-base/htdocs/luci-static/resources/firewall.js +++ b/modules/luci-base/htdocs/luci-static/resources/firewall.js @@ -92,7 +92,6 @@ Firewall = L.Class.extend({ z = uci.add('firewall', 'zone'); uci.set('firewall', z, 'name', name); - uci.set('firewall', z, 'network', ' '); uci.set('firewall', z, 'input', d.getInput() || 'DROP'); uci.set('firewall', z, 'output', d.getOutput() || 'DROP'); uci.set('firewall', z, 'forward', d.getForward() || 'DROP'); @@ -333,17 +332,17 @@ Zone = AbstractFirewallItem.extend({ return false; newNetworks.push(network); - this.set('network', newNetworks.join(' ')); + this.set('network', newNetworks); return true; }, deleteNetwork: function(network) { var oldNetworks = this.getNetworks(), - newNetworks = oldNetworks.filter(function(net) { return net != network }); + newNetworks = oldNetworks.filter(function(net) { return net != network }); if (newNetworks.length > 0) - this.set('network', newNetworks.join(' ')); + this.set('network', newNetworks); else this.set('network', null); @@ -355,7 +354,7 @@ Zone = AbstractFirewallItem.extend({ }, clearNetworks: function() { - this.set('network', ' '); + this.set('network', null); }, getDevices: function() { |