diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2023-08-05 18:49:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 18:49:50 +0300 |
commit | 503ae0018d9672fe6260cca1ead88394f0df3608 (patch) | |
tree | b142d85bee6a472173ed9f74a67765798118fd37 /modules/luci-mod-network/htdocs/luci-static | |
parent | 0ea74956c9e7ae415cf6ef11d810888c422db309 (diff) | |
parent | 8a170b3149cf1d08f431cfa859dbc09d539035f0 (diff) |
Merge pull request #6335 from arbolitoloco1/patch-4
luci-mod-network: add support for creating cname records
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js | 22 |
1 files changed, 22 insertions, 0 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 4f71d2d989..e1333d7954 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 @@ -262,6 +262,7 @@ return view.extend({ s.tab('hosts', _('Hostnames')); s.tab('srvhosts', _('SRV')); s.tab('mxhosts', _('MX')); + s.tab('cnamehosts', _('CNAME')); s.tab('ipsets', _('IP Sets')); s.taboption('general', form.Flag, 'domainneeded', @@ -694,6 +695,27 @@ return view.extend({ so.datatype = 'range(0,65535)'; 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, _('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.')); |