luci-base: firewall.js: add zone.getDevices() and zone.getSubnets() getters

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-07-22 16:29:42 +02:00
parent e6ff0f39bb
commit b63576bbe7

View 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 = [];