diff options
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua | 4 | ||||
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua index b52dff13ac..3e46628d3f 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/vlan.lua @@ -260,7 +260,7 @@ m.uci:foreach("network", "switch", end - local vid = s:option(Value, has_vlan4k or "vlan", "VLAN ID", "<div id='portstatus-%s'></div>" % switch_name) + local vid = s:option(Value, has_vlan4k or "vlan", "VLAN ID") local mx_vid = has_vlan4k and 4094 or (num_vlans - 1) vid.rmempty = false @@ -333,7 +333,7 @@ m.uci:foreach("network", "switch", local _, pt for _, pt in ipairs(topo.ports) do - local po = s:option(ListValue, tostring(pt.num), pt.label, '<div id="portstatus-%s-%d"></div>' %{ switch_name, pt.num }) + local po = s:option(ListValue, tostring(pt.num), pt.label) po:value("", translate("off")) 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) |