From 9adda4ae40c89be2c83c3b75b865e047acce13a3 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 19 Oct 2023 23:44:53 +0200 Subject: [PATCH] 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) --- .../luci-static/resources/view/status/include/40_dhcp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')), -- 2.30.2