luci-mod-network: show leases first in DHCP tab
authorDavid Härdeman <david@hardeman.nu>
Tue, 30 Dec 2025 17:31:17 +0000 (18:31 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Wed, 31 Dec 2025 00:52:36 +0000 (00:52 +0000)
Fiddling with the dnsmasq/odhcpd specific settings is (at least in my
experience) a much less common operation than wanting to see/change
leases and their configuration, so reorder the tabs to show leases first
and dnsmasq/odhcpd tabs second/third.

Signed-off-by: David Härdeman <david@hardeman.nu>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index ed040fa7c1f661a9135c90098f2e576825c9dc72..509e9fe89e3cebfd4d24bf13899cefbdf033e470 100644 (file)
@@ -211,14 +211,14 @@ return view.extend({
                m = new form.Map('dhcp', _('DHCP'));
                m.tabbed = true;
 
+               this.add_leases_cfg(m, hosts, duids, pools, macdata);
+
                if (L.hasSystemFeature('dnsmasq'))
                        this.add_dnsmasq_cfg(m, networks);
 
                if (L.hasSystemFeature('odhcpd'))
                        this.add_odhcpd_cfg(m);
 
-               this.add_leases_cfg(m, hosts, duids, pools, macdata);
-
                return m.render().then(function(mapEl) {
                        poll.add(function() {
                                return callDHCPLeases().then(function(leaseinfo) {