From a4f87896e4279f7b43129a8258a3d7b8e12dead2 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Sat, 18 Nov 2023 16:56:27 +0100 Subject: [PATCH] luci-mod-network: DHCP tab IPsets ( add NFTsets properties ) See also: https://github.com/openwrt/openwrt/commit/d7f378796f985c902ff7906767c275c40a15347f Signed-off-by: Paul Donald (cherry picked from commit f98ce31fdbdfc61c8ec7443c791a98d9ee93b6f2) --- .../resources/view/network/dhcp.js | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 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 5da8a68054..86c74d6f98 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 @@ -727,22 +727,41 @@ return view.extend({ }); o = s.taboption('ipsets', form.SectionValue, '__ipsets__', form.GridSection, 'ipset', null, - _('List of IP sets to populate with the IPs of DNS lookup results of the FQDNs also specified here.')); + _('List of IP sets to populate with the IPs of DNS lookup results of the FQDNs also specified here.') + '
' + + _('The netfilter components below are only regarded when running fw4.')); ss = o.subsection; ss.addremove = true; ss.anonymous = true; ss.sortable = true; + ss.rowcolors = true; + ss.nodescriptions = true; + ss.modaltitle = _('Edit IP set'); - so = ss.option(form.DynamicList, 'name', _('IP set')); + so = ss.option(form.DynamicList, 'name', _('Name of the set')); so.rmempty = false; + so.editable = true; so.datatype = 'string'; - so = ss.option(form.DynamicList, 'domain', _('Domain')); + so = ss.option(form.DynamicList, 'domain', _('FQDN')); so.rmempty = false; + so.editable = true; so.datatype = 'hostname'; + so = ss.option(form.Value, 'table', _('Netfilter table name'), _('Defaults to fw4.')); + so.editable = true; + so.placeholder = 'fw4'; + so.rmempty = true; + + so = ss.option(form.ListValue, 'table_family', _('Table IP family'), _('Defaults to IPv4+6.') + ' ' + _('Can be hinted by adding 4 or 6 to the name.') + '
' + + _('Adding an IPv6 to an IPv4 set and vice-versa silently fails.')); + so.editable = true; + so.rmempty = true; + so.value('inet', _('IPv4+6')); + so.value('ip', _('IPv4')); + so.value('ip6', _('IPv6')); + 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.') + '
' + _('Use the Add Button to add a new lease entry. The MAC address identifies the host, the IPv4 address specifies the fixed address to use, and the Hostname is assigned as a symbolic name to the requesting host. The optional Lease time can be used to set non-standard host-specific lease time, e.g. 12h, 3d or infinite.')); -- 2.30.2