Merge pull request #5436 from vgaetera/dhcp-ipset
This commit is contained in:
commit
9aaebdf8de
1 changed files with 20 additions and 2 deletions
|
@ -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.'));
|
||||
|
|
Loading…
Reference in a new issue