luci-base: firewall.js: add zone.getDevices() and zone.getSubnets() getters
authorJo-Philipp Wich <jo@mein.io>
Mon, 22 Jul 2019 14:29:42 +0000 (16:29 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 22 Jul 2019 14:29:42 +0000 (16:29 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/firewall.js

index d034d6e01068afe2d8b5a1c297ea8bbbde270fb0..9ae14e16d9910d77c4c9e58d71698a2620f74ac9 100644 (file)
@@ -375,6 +375,14 @@ Zone = AbstractFirewallItem.extend({
                this.set('network', ' ');
        },
 
+       getDevices: function() {
+               return L.toArray(this.get('device'));
+       },
+
+       getSubnets: function() {
+               return L.toArray(this.get('subnet'));
+       },
+
        getForwardingsBy: function(what) {
                var sections = uci.sections('firewall', 'forwarding'),
                    forwards = [];