diff options
author | Paul Donald <newtwen+github@gmail.com> | 2024-10-23 01:33:21 +0200 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-10-23 01:33:21 +0200 |
commit | 4254b02e79df46af8172fec0fa52c2d0fec41ed3 (patch) | |
tree | 6dd7f0cc275db0ee0ea48bd038a4bafcad943159 /modules | |
parent | f88f9034f20a97a50179881cde89676f5b5dd948 (diff) |
luci-mod-network: Add filter-rr to filter responses by record type name
This follows https://github.com/openwrt/openwrt/pull/14975
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js | 40 |
1 files changed, 40 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 6a94952eab..e6333b89d3 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 @@ -307,6 +307,36 @@ return view.extend({ }; + const recordtypes = [ + 'ANY', + 'A', + 'AAAA', + 'ALIAS', + 'CAA', + 'CERT', + 'CNAME', + 'DS', + 'HINFO', + 'HIP', + 'HTTPS', + 'KEY', + 'LOC', + 'MX', + 'NAPTR', + 'NS', + 'OPENPGPKEY', + 'PTR', + 'RP', + 'SIG', + 'SOA', + 'SRV', + 'SSHFP', + 'SVCB', + 'TLSA', + 'TXT', + 'URI', + ] + function customi18n(template, values) { if (!values) values = noi18nstrings; @@ -648,6 +678,16 @@ return view.extend({ _('Remove IPv4 addresses from the results and only return IPv6 addresses.')); o.optional = true; + o = s.taboption('filteropts', form.MultiValue, 'filter_rr', + _('Filter arbitrary RR'), _('Removes records of the specified type(s) from answers.')); + o.optional = true; + o.create = true; + o.multiple = true; + o.display_size = 5; + recordtypes.forEach(r => { + o.value(r); + }); + s.taboption('filteropts', form.Flag, 'localise_queries', _('Localise queries'), customi18n(_('Limit response records (from {etc_hosts}) to those that fall within the subnet of the querying interface.') ) + '<br />' + |