luci-mod-status: persist sorting of DHCP lease status tables
authorJo-Philipp Wich <jo@mein.io>
Thu, 19 Oct 2023 21:44:53 +0000 (23:44 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 19 Oct 2023 21:46:32 +0000 (23:46 +0200)
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 <jo@mein.io>
(cherry picked from commit 603992560c5ca4b5929047e8e8c70f901f75d7f7)

modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js

index 956c1b20f98261f2504221984b6e5249187127c1..4c5291642363010cd61954ab683638943669d6a9 100644 (file)
@@ -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')),