diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-06-26 19:49:42 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-06-26 19:51:36 +0200 |
commit | 8d7869f672f671733263e58956092ca57963adb4 (patch) | |
tree | daca9a0f2531c4fd69e64b79ab58cca729c703b4 /modules/luci-mod-admin-full/luasrc/view | |
parent | 60c5d15e9eb46016bba7383b103cf95ebb997886 (diff) |
luci-mod-admin-full: properly remap ports in switch status display
Fixes: 60c5d15e9 ("luci-mod-admin-full: fix possible switch status layout bug")
Fixes: bbf096c79 ("luci-mod-admin-full: cleanup markup")
Reported-at: https://forum.lede-project.org/t/x/15897/19
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/view')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm index 8a42a117e1..68f0bbc9d4 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm @@ -33,9 +33,9 @@ { for (var j = 0; j < ports.length; j++) { - var th = tr.childNodes[j+1]; + var th = tr.querySelector('[data-name="%d"]'.format(j)); - if (!th || !th.hasAttribute('data-name')) + if (!th) continue; if (ports[j].link) |