mirror of https://git.openwrt.org/project/luci.git
luci-mod-network: Fill ipset name choice with available firewall ipsets
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
parent
ea6ac8b2b6
commit
9aee1c47a6
|
@ -277,7 +277,8 @@ return view.extend({
|
||||||
callHostHints(),
|
callHostHints(),
|
||||||
callDUIDHints(),
|
callDUIDHints(),
|
||||||
getDHCPPools(),
|
getDHCPPools(),
|
||||||
network.getNetworks()
|
network.getNetworks(),
|
||||||
|
uci.load('firewall')
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -976,6 +977,11 @@ return view.extend({
|
||||||
ss.modaltitle = _('Edit IP set');
|
ss.modaltitle = _('Edit IP set');
|
||||||
|
|
||||||
so = ss.option(form.DynamicList, 'name', _('Name of the set'));
|
so = ss.option(form.DynamicList, 'name', _('Name of the set'));
|
||||||
|
uci.sections('firewall', 'ipset', function(s) {
|
||||||
|
console.log('fukt:', s);
|
||||||
|
if (typeof(s.name) == 'string')
|
||||||
|
so.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name);
|
||||||
|
});
|
||||||
so.rmempty = false;
|
so.rmempty = false;
|
||||||
so.editable = false;
|
so.editable = false;
|
||||||
so.datatype = 'string';
|
so.datatype = 'string';
|
||||||
|
|
Loading…
Reference in New Issue