summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs
diff options
context:
space:
mode:
authorPaul Dee <itsascambutmailmeanyway@gmail.com>2022-10-19 20:38:55 +0200
committerJo-Philipp Wich <jo@mein.io>2022-10-20 23:47:12 +0200
commit3240714ed38556e48c635cd4e2703a45ac6fb45d (patch)
tree36dcf65cacf6f5895b9f8a7f09a99392aad7bc06 /modules/luci-mod-network/htdocs
parent08a089740af0c9734169f6dc206beec09fe80324 (diff)
luci-mod-network: 'mxhosts' tab added
DHCP Help does not document mxhost, but they are available in dnsmasq. This effectively implements MX records within DNS. Tested on 22.03.2 Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com> [fix _() calls, fix commit subject, rebase onto current master] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js29
1 files changed, 29 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 d260c95814..44f3346595 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
@@ -256,6 +256,7 @@ return view.extend({
s.tab('leases', _('Static Leases'));
s.tab('hosts', _('Hostnames'));
s.tab('srvhosts', _('SRV'));
+ s.tab('mxhosts', _('MX'));
s.tab('ipsets', _('IP Sets'));
s.taboption('general', form.Flag, 'domainneeded',
@@ -554,6 +555,7 @@ return view.extend({
+ '<br />' + _('_proto: _tcp, _udp, _sctp, _quic, … .')
+ '<br />' + _('You may add multiple records for the same Target.')
+ '<br />' + _('Larger weights (of the same prio) are given a proportionately higher probability of being selected.'));
+
ss = o.subsection;
ss.addremove = true;
@@ -586,6 +588,33 @@ return view.extend({
so.datatype = 'range(0,65535)';
so.placeholder = '50';
+ o = s.taboption('mxhosts', form.SectionValue, '__mxhosts__', form.TableSection, 'mxhost', null,
+ _('Bind service records to a domain name: specify the location of services.')
+ + '<br />' + _('You may add multiple records for the same domain.'));
+
+ ss = o.subsection;
+
+ ss.addremove = true;
+ ss.anonymous = true;
+ ss.sortable = true;
+ ss.rowcolors = true;
+ ss.nodescriptions = true;
+
+ so = ss.option(form.Value, 'domain', _('Domain'));
+ so.rmempty = false;
+ so.datatype = 'hostname';
+ so.placeholder = 'example.com';
+
+ so = ss.option(form.Value, 'relay', _('Relay'));
+ so.rmempty = false;
+ so.datatype = 'hostname';
+ so.placeholder = 'relay.example.com';
+
+ so = ss.option(form.Value, 'pref', _('Priority'), _('Ordinal: lower comes first.'));
+ so.rmempty = true;
+ so.datatype = 'range(0,65535)';
+ so.placeholder = '0';
+
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.'));