From: Jo-Philipp Wich Date: Thu, 19 Oct 2023 21:44:53 +0000 (+0200) Subject: luci-mod-status: persist sorting of DHCP lease status tables X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=20daafca6be431029d58fe97a3e1392129bb3b6b;p=project%2Fluci.git luci-mod-status: persist sorting of DHCP lease status tables Add an ID attribute to the dynamically generated lease status tables to persist row ordering choice across reloads. Fixes: #6640 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 603992560c5ca4b5929047e8e8c70f901f75d7f7) --- diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js index 956c1b20f9..4c52916423 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js @@ -82,7 +82,7 @@ return baseclass.extend({ } }; - var table = E('table', { 'class': 'table lases' }, [ + var table = E('table', { 'id': 'status_leases', 'class': 'table lases' }, [ E('tr', { 'class': 'tr table-titles' }, [ E('th', { 'class': 'th' }, _('Hostname')), E('th', { 'class': 'th' }, _('IPv4 address')), @@ -129,7 +129,7 @@ return baseclass.extend({ return rows; }, this)), E('em', _('There are no active leases'))); - var table6 = E('table', { 'class': 'table leases6' }, [ + var table6 = E('table', { 'id': 'status_leases6', 'class': 'table leases6' }, [ E('tr', { 'class': 'tr table-titles' }, [ E('th', { 'class': 'th' }, _('Host')), E('th', { 'class': 'th' }, _('IPv6 address')),