summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network
diff options
context:
space:
mode:
authorPaul Donald <newtwen+github@gmail.com>2024-05-28 01:19:45 +0200
committerPaul Donald <newtwen+github@gmail.com>2024-05-28 01:19:45 +0200
commit9aee1c47a66e8d4dbc4313c6876691d3f546a049 (patch)
tree084fc585bb6fba6ba10ce1751edd336063c288df /modules/luci-mod-network
parentea6ac8b2b604d85d10318048b877a651c862b130 (diff)
luci-mod-network: Fill ipset name choice with available firewall ipsets
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'modules/luci-mod-network')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
index 9a6240b69f..0621a12d24 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
@@ -277,7 +277,8 @@ return view.extend({
callHostHints(),
callDUIDHints(),
getDHCPPools(),
- network.getNetworks()
+ network.getNetworks(),
+ uci.load('firewall')
]);
},
@@ -976,6 +977,11 @@ return view.extend({
ss.modaltitle = _('Edit IP 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.editable = false;
so.datatype = 'string';