luci-mod-network: organize "logging" tab in dhcp/dns views
authorDavid Härdeman <[email protected]>
Wed, 15 Oct 2025 16:50:11 +0000 (18:50 +0200)
committerPaul Donald <[email protected]>
Sat, 18 Oct 2025 21:51:38 +0000 (23:51 +0200)
Sort the options in the "logging" tab so that they are all grouped together in
the order they appear in the UI and delete ones that are specific to DNS from
dhcp.js and vice versa.

Note that this means that the "logfacility" option is present in both views,
since it controls the general logfacility of dnsmasq, both for DNS and DHCP.

We might consider adding a help text blurb explaining that, but I've
intentionally not changed any code in these patches.

Signed-off-by: David Härdeman <[email protected]>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js

index 4f915c2661a35867b139a6b5b540b31fb5c1c6fb..d07bc8c102dc1db828d68cd3f12fc5c632bac79f 100644 (file)
@@ -442,11 +442,7 @@ return view.extend({
                o.nocreate = true;
                // End devices
 
-               o = s.taboption('logging', form.Flag, 'logqueries',
-                       _('Log queries'),
-                       _('Write received DNS queries to syslog.') + ' ' + _('Dump cache on SIGUSR1, include requesting IP.'));
-               o.optional = true;
-
+               // Begin logging
                o = s.taboption('logging', form.Flag, 'logdhcp',
                        _('Extra DHCP logging'),
                        _('Log all options sent to DHCP clients and the tags used to determine them.'));
@@ -475,6 +471,13 @@ return view.extend({
                o.value('LOCAL7');
                o.value('-', _('stderr'));
 
+               o = s.taboption('logging', form.Flag, 'quietdhcp',
+                       _('Suppress logging'),
+                       _('Suppress logging of the routine operation for the DHCP protocol.'));
+               o.optional = true;
+               o.depends('logdhcp', '0');
+               // End logging
+
                o = s.taboption('relay', form.SectionValue, '__relays__', form.TableSection, 'relay', null,
                        _('Relay DHCP requests elsewhere. OK: v4↔v4, v6↔v6. Not OK: v4↔v6, v6↔v4.')
                        + '<br />' + _('Note: you may also need a DHCP Proxy (currently unavailable) when specifying a non-standard Relay To port(<code>addr#port</code>).')
@@ -585,12 +588,6 @@ return view.extend({
                o.optional = true;
                o.placeholder = '/etc/dnsmasq.hosts';
 
-               o = s.taboption('logging', form.Flag, 'quietdhcp',
-                       _('Suppress logging'),
-                       _('Suppress logging of the routine operation for the DHCP protocol.'));
-               o.optional = true;
-               o.depends('logdhcp', '0');
-
                o = s.taboption('pxe_tftp', form.Flag, 'enable_tftp',
                        _('Enable TFTP server'),
                        _('Enable the built-in single-instance TFTP server.'));
index 659a8242f7dd4b137da32fd8ffd775267d2e99d0..97523262fdc95f7c7a1587bdd382de02b0638250 100644 (file)
@@ -954,16 +954,12 @@ return view.extend({
                o.placeholder = 3600;
                // End limits
 
+               // Being logging
                o = s.taboption('logging', form.Flag, 'logqueries',
                        _('Log queries'),
                        _('Write received DNS queries to syslog.') + ' ' + _('Dump cache on SIGUSR1, include requesting IP.'));
                o.optional = true;
 
-               o = s.taboption('logging', form.Flag, 'logdhcp',
-                       _('Extra DHCP logging'),
-                       _('Log all options sent to DHCP clients and the tags used to determine them.'));
-               o.optional = true;
-
                o = s.taboption('logging', form.Value, 'logfacility',
                        _('Log facility'),
                        _('Set log class/facility for syslog entries.'));
@@ -986,6 +982,7 @@ return view.extend({
                o.value('LOCAL6');
                o.value('LOCAL7');
                o.value('-', _('stderr'));
+               // End logging
 
                o = s.taboption('relay', form.SectionValue, '__relays__', form.TableSection, 'relay', null,
                        _('Relay DHCP requests elsewhere. OK: v4↔v4, v6↔v6. Not OK: v4↔v6, v6↔v4.')
@@ -1097,12 +1094,6 @@ return view.extend({
                o.optional = true;
                o.placeholder = '/etc/dnsmasq.hosts';
 
-               o = s.taboption('logging', form.Flag, 'quietdhcp',
-                       _('Suppress logging'),
-                       _('Suppress logging of the routine operation for the DHCP protocol.'));
-               o.optional = true;
-               o.depends('logdhcp', '0');
-
                o = s.taboption('pxe_tftp', form.Flag, 'enable_tftp',
                        _('Enable TFTP server'),
                        _('Enable the built-in single-instance TFTP server.'));