luci-mod-network: added support for cname records
This commit adds a tab that allows creating CNAME records Signed-off-by: Santiago Kozak <santikzk1406@gmail.com>
This commit is contained in:
parent
31def1846d
commit
8a170b3149
1 changed files with 22 additions and 0 deletions
|
@ -262,6 +262,7 @@ return view.extend({
|
||||||
s.tab('hosts', _('Hostnames'));
|
s.tab('hosts', _('Hostnames'));
|
||||||
s.tab('srvhosts', _('SRV'));
|
s.tab('srvhosts', _('SRV'));
|
||||||
s.tab('mxhosts', _('MX'));
|
s.tab('mxhosts', _('MX'));
|
||||||
|
s.tab('cnamehosts', _('CNAME'));
|
||||||
s.tab('ipsets', _('IP Sets'));
|
s.tab('ipsets', _('IP Sets'));
|
||||||
|
|
||||||
s.taboption('general', form.Flag, 'domainneeded',
|
s.taboption('general', form.Flag, 'domainneeded',
|
||||||
|
@ -694,6 +695,27 @@ return view.extend({
|
||||||
so.datatype = 'range(0,65535)';
|
so.datatype = 'range(0,65535)';
|
||||||
so.placeholder = '0';
|
so.placeholder = '0';
|
||||||
|
|
||||||
|
o = s.taboption('cnamehosts', form.SectionValue, '__cname__', form.TableSection, 'cname', null,
|
||||||
|
_('Set an alias for a hostname.'));
|
||||||
|
|
||||||
|
ss = o.subsection;
|
||||||
|
|
||||||
|
ss.addremove = true;
|
||||||
|
ss.anonymous = true;
|
||||||
|
ss.sortable = true;
|
||||||
|
ss.rowcolors = true;
|
||||||
|
ss.nodescriptions = true;
|
||||||
|
|
||||||
|
so = ss.option(form.Value, 'cname', _('Domain'));
|
||||||
|
so.rmempty = false;
|
||||||
|
so.datatype = 'hostname';
|
||||||
|
so.placeholder = 'www.example.com';
|
||||||
|
|
||||||
|
so = ss.option(form.Value, 'target', _('Target'));
|
||||||
|
so.rmempty = false;
|
||||||
|
so.datatype = 'hostname';
|
||||||
|
so.placeholder = 'example.com';
|
||||||
|
|
||||||
o = s.taboption('hosts', form.SectionValue, '__hosts__', form.GridSection, 'domain', null,
|
o = s.taboption('hosts', form.SectionValue, '__hosts__', form.GridSection, 'domain', null,
|
||||||
_('Hostnames are used to bind a domain name to an IP address. This setting is redundant for hostnames already configured with static leases, but it can be useful to rebind an FQDN.'));
|
_('Hostnames are used to bind a domain name to an IP address. This setting is redundant for hostnames already configured with static leases, but it can be useful to rebind an FQDN.'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue