luci-base: firewall.js: add zone.getDevices() and zone.getSubnets() getters
[project/luci.git] / 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 = [];