summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-10-12 11:21:56 +0200
committerGitHub <noreply@github.com>2021-10-12 11:21:56 +0200
commit9aaebdf8de83e0f12b994b7210b2192eb8d9c459 (patch)
treecf5892a1a4a9c76be9a81a5a2181680eb1d9d2e8
parent4b5da809e03b2321d8362a289aa1b4979f8e8a71 (diff)
parent6ee3482af2ff6e947f5afd3f1898cdefb18f3c68 (diff)
Merge pull request #5436 from vgaetera/dhcp-ipset
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js22
1 files changed, 20 insertions, 2 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 d7f6910787..a04052121e 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
@@ -254,6 +254,7 @@ return view.extend({
s.tab('advanced', _('Advanced Settings'));
s.tab('leases', _('Static Leases'));
s.tab('hosts', _('Hostnames'));
+ s.tab('ipsets', _('IP Sets'));
s.taboption('general', form.Flag, 'domainneeded',
_('Domain required'),
@@ -501,12 +502,12 @@ return view.extend({
ss.sortable = true;
so = ss.option(form.Value, 'name', _('Hostname'));
+ so.rmempty = false;
so.datatype = 'hostname';
- so.rmempty = true;
so = ss.option(form.Value, 'ip', _('IP address'));
+ so.rmempty = false;
so.datatype = 'ipaddr';
- so.rmempty = true;
var ipaddrs = {};
@@ -521,6 +522,23 @@ return view.extend({
so.value(ipv4, '%s (%s)'.format(ipv4, ipaddrs[ipv4]));
});
+ o = s.taboption('ipsets', form.SectionValue, '__ipsets__', form.GridSection, 'ipset', null,
+ _('List of IP sets to populate with the specified domain IPs.'));
+
+ ss = o.subsection;
+
+ ss.addremove = true;
+ ss.anonymous = true;
+ ss.sortable = true;
+
+ so = ss.option(form.DynamicList, 'name', _('IP set'));
+ so.rmempty = false;
+ so.datatype = 'string';
+
+ so = ss.option(form.DynamicList, 'domain', _('Domain'));
+ so.rmempty = false;
+ so.datatype = 'hostname';
+
o = s.taboption('leases', form.SectionValue, '__leases__', form.GridSection, 'host', null,
_('Static leases are used to assign fixed IP addresses and symbolic hostnames to DHCP clients. They are also required for non-dynamic interface configurations where only hosts with a corresponding lease are served.') + '<br />' +
_('Use the <em>Add</em> Button to add a new lease entry. The <em>MAC address</em> identifies the host, the <em>IPv4 address</em> specifies the fixed address to use, and the <em>Hostname</em> is assigned as a symbolic name to the requesting host. The optional <em>Lease time</em> can be used to set non-standard host-specific lease time, e.g. 12h, 3d or infinite.'));