From 067d7dc9f708d5ebeda1072fb6dc82e960de0d81 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 28 May 2018 14:57:54 +0200 Subject: treewide: convert HTML tables to div Mostly convert HTML tables to div based markup to allow for easier styling in the future. Also change JS accessor code accordingly. Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/admin_status/bandwidth.htm | 44 +-- .../luasrc/view/admin_status/connections.htm | 112 ++++--- .../luasrc/view/admin_status/index.htm | 351 +++++++++------------ .../luasrc/view/admin_status/iptables.htm | 68 ++-- .../luasrc/view/admin_status/load.htm | 64 ++-- .../luasrc/view/admin_status/routes.htm | 112 +++---- .../luasrc/view/admin_status/wireless.htm | 56 ++-- 7 files changed, 382 insertions(+), 425 deletions(-) (limited to 'modules/luci-mod-admin-full/luasrc/view/admin_status') diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm index 33bbee7843..db1d0b8883 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/bandwidth.htm @@ -275,27 +275,27 @@
-

- - - - - - - - - - - - - - - - - - - - - -
<%:Inbound:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Average:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Peak:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Outbound:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Average:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Peak:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
+
+
+
<%:Inbound:%>
+
0 <%:kbit/s%>
(0 <%:kB/s%>)
+ +
<%:Average:%>
+
0 <%:kbit/s%>
(0 <%:kB/s%>)
+ +
<%:Peak:%>
+
0 <%:kbit/s%>
(0 <%:kB/s%>)
+
+
+
<%:Outbound:%>
+
0 <%:kbit/s%>
(0 <%:kB/s%>)
+ +
<%:Average:%>
+
0 <%:kbit/s%>
(0 <%:kB/s%>)
+ +
<%:Peak:%>
+
0 <%:kbit/s%>
(0 <%:kB/s%>)
+
+
<%+footer%> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm index b7ebc41451..30d93f78bc 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/connections.htm @@ -139,8 +139,8 @@ { var conn = json.connections; - while (conn_table.rows.length > 1) - conn_table.rows[0].parentNode.deleteRow(-1); + while (conn_table.firstElementChild !== conn_table.lastElementChild) + conn_table.removeChild(conn_table.lastElementChild); var lookup_queue = [ ]; @@ -153,13 +153,10 @@ { var c = conn[i]; - if ((c.src == '127.0.0.1' && c.dst == '127.0.0.1') - || (c.src == '::1' && c.dst == '::1')) + if ((c.src == '127.0.0.1' && c.dst == '127.0.0.1') || + (c.src == '::1' && c.dst == '::1')) continue; - var tr = conn_table.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2)); - if (!dns_cache[c.src]) lookup_queue.push(c.src); @@ -169,14 +166,13 @@ var src = dns_cache[c.src] || (c.layer3 == 'ipv6' ? '[' + c.src + ']' : c.src); var dst = dns_cache[c.dst] || (c.layer3 == 'ipv6' ? '[' + c.dst + ']' : c.dst); - tr.insertCell(-1).innerHTML = c.layer3.toUpperCase(); - tr.insertCell(-1).innerHTML = c.layer4.toUpperCase(); - tr.insertCell(-1).innerHTML = String.format('%s:%d', src, c.sport); - tr.insertCell(-1).innerHTML = String.format('%s:%d', dst, c.dport); - - var traf = tr.insertCell(-1); - traf.style.whiteSpace = 'nowrap'; - traf.innerHTML = String.format('%1024.2mB (%d <%:Pkts.%>)', c.bytes, c.packets); + conn_table.appendChild(E('
'.format(1 + (i % 2)), [ + E('
', c.layer3.toUpperCase()), + E('
', c.layer4.toUpperCase()), + E('
', [ src, ':', c.sport ]), + E('
', [ dst, ':', c.dport ]), + E('
', '%1024.2mB (%d <%:Pkts.%>)'.format(c.bytes, c.packets)), + ])); } if (lookup_queue.length > 0) @@ -324,52 +320,52 @@
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<%:UDP:%>0<%:Average:%>0<%:Peak:%>0
<%:TCP:%>0<%:Average:%>0<%:Peak:%>0
<%:Other:%>0<%:Average:%>0<%:Peak:%>0
+
+
+
<%:UDP:%>
+
0
+ +
<%:Average:%>
+
0
+ +
<%:Peak:%>
+
0
+
+
+
<%:TCP:%>
+
0
+ +
<%:Average:%>
+
0
+ +
<%:Peak:%>
+
0
+
+
+
<%:Other:%>
+
0
+ +
<%:Average:%>
+
0
+ +
<%:Peak:%>
+
0
+
+

- - - - - - - - - - -
<%:Network%><%:Protocol%><%:Source%><%:Destination%><%:Transfer%>
<%:Collecting data...%>
+
+
+
<%:Network%>
+
<%:Protocol%>
+
<%:Source%>
+
<%:Destination%>
+
<%:Transfer%>
+
+ +
<%:Collecting data...%>
+
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm index 5e6e494ad6..a72936f321 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm @@ -235,7 +235,7 @@ '<%:Type%>: %s%s
', ifc6.proto, (ifc6.ip6prefix) ? '-pd' : '' ); - + if (!ifc6.ip6prefix) { s += String.format( @@ -358,10 +358,10 @@ if (ls) { /* clear all rows */ - while( ls.rows.length > 1 ) - ls.rows[0].parentNode.deleteRow(1); + while (ls.firstElementChild !== ls.lastElementChild) + ls.removeChild(ls.lastElementChild); - for( var i = 0; i < info.leases.length; i++ ) + for (var i = 0; i < info.leases.length; i++) { var timestr; @@ -372,24 +372,16 @@ else timestr = String.format('%t', info.leases[i].expires); - var tr = ls.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); - - tr.insertCell(-1).innerHTML = info.leases[i].hostname ? info.leases[i].hostname : '?'; - tr.insertCell(-1).innerHTML = info.leases[i].ipaddr; - tr.insertCell(-1).innerHTML = info.leases[i].macaddr; - tr.insertCell(-1).innerHTML = timestr; + ls.appendChild(E('
'.format((i % 2) + 1), [ + E('
', info.leases[i].hostname ? info.leases[i].hostname : '?'), + E('
', info.leases[i].ipaddr), + E('
', info.leases[i].macaddr), + E('
', timestr) + ])); } - if( ls.rows.length == 1 ) - { - var tr = ls.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 4; - td.innerHTML = '
<%:There are no active leases.%>
'; - } + if (ls.firstElementChild === ls.lastElementChild) + ls.appendChild(E('

<%:There are no active leases.%>
')); } var ls6 = document.getElementById('lease6_status_table'); @@ -398,10 +390,10 @@ ls6.parentNode.style.display = 'block'; /* clear all rows */ - while( ls6.rows.length > 1 ) - ls6.rows[0].parentNode.deleteRow(1); + while (ls6.firstElementChild !== ls6.lastElementChild) + ls6.removeChild(ls6.lastElementChild); - for( var i = 0; i < info.leases6.length; i++ ) + for (var i = 0; i < info.leases6.length; i++) { var timestr; @@ -412,35 +404,29 @@ else timestr = String.format('%t', info.leases6[i].expires); - var tr = ls6.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); - - var host = hosts[duid2mac(info.leases6[i].duid)]; - if (!info.leases6[i].hostname) - tr.insertCell(-1).innerHTML = - (host && (host.name || host.ipv4 || host.ipv6)) - ? '
? (%h)
'.format(host.name || host.ipv4 || host.ipv6) - : '?'; - else - tr.insertCell(-1).innerHTML = - (host && host.name && info.leases6[i].hostname != host.name) - ? '
%h (%h)
'.format(info.leases6[i].hostname, host.name) - : info.leases6[i].hostname; - - tr.insertCell(-1).innerHTML = info.leases6[i].ip6addr; - tr.insertCell(-1).innerHTML = info.leases6[i].duid; - tr.insertCell(-1).innerHTML = timestr; - } + var host = hosts[duid2mac(info.leases6[i].duid)], + name = info.leases6[i].hostname, + hint = null; - if( ls6.rows.length == 1 ) - { - var tr = ls6.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row'; + if (!name) { + if (host) + hint = host.name || host.ipv4 || host.ipv6; + } + else { + if (host && host.name && info.leases6[i].hostname != host.name) + hint = host.name; + } - var td = tr.insertCell(-1); - td.colSpan = 4; - td.innerHTML = '
<%:There are no active leases.%>
'; + ls6.appendChild(E('
'.format((i % 2) + 1), [ + E('
', hint ? '
%h (%h)
'.format(name || '?', hint) : (name || '?')), + E('
', info.leases6[i].ip6addr), + E('
', info.leases6[i].duid), + E('
', timestr) + ])); } + + if (ls6.firstElementChild === ls6.lastElementChild) + ls6.appendChild(E('

<%:There are no active leases.%>
')); } <% end %> @@ -450,24 +436,12 @@ var ws = document.getElementById('wifi_status_table'); if (ws) { - var wsbody = ws.rows[0].parentNode; - while (ws.rows.length > 0) - wsbody.deleteRow(0); + while (ws.lastElementChild) + ws.removeChild(ws.lastElementChild); for (var didx = 0; didx < info.wifinets.length; didx++) { var dev = info.wifinets[didx]; - - var tr = wsbody.insertRow(-1); - var td; - - td = tr.insertCell(-1); - td.width = "33%"; - td.innerHTML = dev.name; - td.style.verticalAlign = "top"; - - td = tr.insertCell(-1); - var s = ''; for (var nidx = 0; nidx < dev.networks.length; nidx++) @@ -490,10 +464,10 @@ icon = "<%=resource%>/icons/signal-75-100.png"; s += String.format( - '
' + + '
' + '' + '
%d%%' + - '
' + + '
' + '<%:SSID%>: %h
' + '<%:Mode%>: %s
' + '<%:Channel%>: %d (%.3f <%:GHz%>)
' + @@ -520,7 +494,7 @@ s += '<%:Wireless is disabled or not associated%>'; } - s += '
'; + s += '
'; for (var bssid in net.assoclist) { @@ -539,7 +513,10 @@ if (!s) s = '<%:No information available%>'; - td.innerHTML = s; + ws.appendChild(E('
', [ + E('
', dev.name), + E('
', s) + ])); } } @@ -547,8 +524,8 @@ if (ac) { /* clear all rows */ - while( ac.rows.length > 1 ) - ac.rows[0].parentNode.deleteRow(1); + while (ac.firstElementChild !== ac.lastElementChild) + ac.removeChild(ac.lastElementChild); assoclist.sort(function(a, b) { return (a.name == b.name) @@ -557,11 +534,8 @@ ; }); - for( var i = 0; i < assoclist.length; i++ ) + for (var i = 0; i < assoclist.length; i++) { - var tr = ac.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + (1 + (i % 2)); - var icon; var q = (-1 * (assoclist[i].noise - assoclist[i].signal)) / 5; if (q < 1) @@ -575,49 +549,31 @@ else icon = "<%=resource%>/icons/signal-75-100.png"; - tr.insertCell(-1).innerHTML = String.format( - ' %h', - assoclist[i].radio, assoclist[i].ifname - ); - - tr.insertCell(-1).innerHTML = String.format( - '%s', - assoclist[i].link, - '%h'.format(assoclist[i].name).nobr() - ); - - tr.insertCell(-1).innerHTML = assoclist[i].bssid; - - var host = hosts[assoclist[i].bssid]; - if (host) - tr.insertCell(-1).innerHTML = String.format( - '
%s
', - ((host.name && (host.ipv4 || host.ipv6)) - ? '%h (%s)'.format(host.name, host.ipv4 || host.ipv6) - : '%h'.format(host.name || host.ipv4 || host.ipv6)).nobr() - ); - else - tr.insertCell(-1).innerHTML = '?'; - - tr.insertCell(-1).innerHTML = String.format( - ' %d / %d <%:dBm%>', - assoclist[i].signal, assoclist[i].noise, assoclist[i].signal - assoclist[i].noise, - icon, - assoclist[i].signal, assoclist[i].noise - ); - - tr.insertCell(-1).innerHTML = wifirate(assoclist[i], true).nobr() + '
' + wifirate(assoclist[i], false).nobr(); + var host = hosts[assoclist[i].bssid], + name = host ? (host.name || host.ipv4 || host.ipv6) : null, + hint = (host && host.name && (host.ipv4 || host.ipv6)) ? (host.ipv4 || host.ipv6) : null; + + ac.appendChild(E('
'.format(1 + (i % 2)), [ + E('
%h
' + .format(assoclist[i].radio, assoclist[i].ifname)), + E('' + .format(assoclist[i].link, assoclist[i].name)), + E('
', + assoclist[i].bssid), + E('
', + hint ? '
%h (%h)
'.format(name || '?', hint) : (name || '?')), + E('
%d / %d <%:dBm%>
' + .format(assoclist[i].signal, assoclist[i].noise, assoclist[i].signal - assoclist[i].noise, icon, assoclist[i].signal, assoclist[i].noise)), + E('
', [ + E('', wifirate(assoclist[i], true)), + E('
'), + E('', wifirate(assoclist[i], false)) + ]) + ])); } - if (ac.rows.length == 1) - { - var tr = ac.rows[0].parentNode.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 7; - td.innerHTML = '
<%:No information available%>'; - } + if (ac.firstElementChild === ac.lastElementChild) + ac.appendChild(E('

<%:No information available%>
')); } <% end %> @@ -679,108 +635,113 @@
<%:System%> - - - - - - - - -
<%:Hostname%><%=luci.sys.hostname() or "?"%>
<%:Model%><%=pcdata(boardinfo.model or boardinfo.system or "?")%>
<%:Firmware Version%> +
+
<%:Hostname%>
<%=luci.sys.hostname() or "?"%>
+
<%:Model%>
<%=pcdata(boardinfo.model or boardinfo.system or "?")%>
+
<%:Firmware Version%>
<%=pcdata(ver.distname)%> <%=pcdata(ver.distversion)%> / <%=pcdata(ver.luciname)%> (<%=pcdata(ver.luciversion)%>) -
<%:Kernel Version%><%=unameinfo.release or "?"%>
<%:Local Time%>-
<%:Uptime%>-
<%:Load Average%>-
+
+
<%:Kernel Version%>
<%=unameinfo.release or "?"%>
+
<%:Local Time%>
-
+
<%:Uptime%>
-
+
<%:Load Average%>
-
+
<%:Memory%> - - - - -
<%:Total Available%>-
<%:Free%>-
<%:Buffered%>-
+
+
<%:Total Available%>
-
+
<%:Free%>
-
+
<%:Buffered%>
-
+
<% if swapinfo.total > 0 then %>
<%:Swap%> - - - -
<%:Total Available%>-
<%:Free%>-
+
+
<%:Total Available%>
-
+
<%:Free%>
-
+
<% end %>
<%:Network%> - - +
+
<%:IPv4 WAN Status%>
+
+

?
+
<%:Collecting data...%>
+
+
<% if has_ipv6 then %> -
+
<%:IPv6 WAN Status%>
+
+

?
+
<%:Collecting data...%>
+
+
<% end %> - -
<%:IPv4 WAN Status%> - - - -

?
<%:Collecting data...%>
-
<%:IPv6 WAN Status%> - - - -

?
<%:Collecting data...%>
-
<%:Active Connections%>-
+
<%:Active Connections%>
-
+
<% if has_dhcp then %>
<%:DHCP Leases%> - - - - - - - - - - -
<%:Hostname%><%:IPv4-Address%><%:MAC-Address%><%:Leasetime remaining%>

<%:Collecting data...%>
+
+
+
<%:Hostname%>
+
<%:IPv4-Address%>
+
<%:MAC-Address%>
+
<%:Leasetime remaining%>
+
+
+

<%:Collecting data...%>
+
+
<% end %> <% if has_dsl then %>
- <%:DSL%> - - -
<%:DSL Status%> - - - -

?
<%:Collecting data...%>
-
+ <%:DSL%> +
+
+
<%:DSL Status%>
+
+
+
+

?
+
<%:Collecting data...%>
+
+
+
+
+
<% end %> @@ -788,27 +749,27 @@
<%:Wireless%> - - -
<%:Collecting data...%>
+
+
<%:Collecting data...%>
+
<%:Associated Stations%> - - - - - - - - - - - - -
 <%:Network%><%:MAC-Address%><%:Host%><%:Signal%> / <%:Noise%><%:RX Rate%> / <%:TX Rate%>

<%:Collecting data...%>
+
+
+
 
+
<%:Network%>
+
<%:MAC-Address%>
+
<%:Host%>
+
<%:Signal%> / <%:Noise%>
+
<%:RX Rate%> / <%:TX Rate%>
+
+
+

<%:Collecting data...%>
+
+
<% end %> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm index 3f4b83b80b..ced4d5f774 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/iptables.htm @@ -92,14 +92,14 @@ <% for _, tbl in ipairs(tables) do chaincnt = 0 %>

<%:Table%>: <%=tbl%>

- +
<% for _, chain in ipairs(ipt:chains(tbl)) do rowcnt = 0 chaincnt = chaincnt + 1 chaininfo = ipt:chain(tbl, chain) %> -
- - - - - - - - - - - - - + + +
+
<%:Pkts.%>
+
<%:Traffic%>
+
<%:Target%>
+
<%:Prot.%>
+
<%:In%>
+
<%:Out%>
+
<%:Source%>
+
<%:Destination%>
+
<%:Options%>
+
<% for _, rule in ipairs(ipt:find({table=tbl, chain=chain})) do %> - - - - - - - - - - - +
+
<%=rule.packets%>
+
<%=wba.byte_format(rule.bytes)%>
+
<%=rule.target and link_target(tbl, rule.target) or "-"%>
+
<%=rule.protocol%>
+
<%=link_iface(rule.inputif)%>
+
<%=link_iface(rule.outputif)%>
+
<%=rule.source%>
+
<%=rule.destination%>
+
<%=#rule.options > 0 and luci.util.pcdata(table.concat(rule.options, " ")) or "-"%>
+
<% end %> <% if rowcnt == 1 then %> - - - +
+
<%:No rules in this chain%>
+
<% end %> <% end %> <% if chaincnt == 0 then %> - - - +
+
<%:No chains in this table%>
+
<% end %> -
+
+

<%:Chain%> <%=chain%> (<%- if chaininfo.policy then -%> @@ -107,47 +107,47 @@ <%- else -%> <%:References%>: <%=chaininfo.references-%> <%- end -%>) -
<%:Pkts.%><%:Traffic%><%:Target%><%:Prot.%><%:In%><%:Out%><%:Source%><%:Destination%><%:Options%>
<%=rule.packets%><%=wba.byte_format(rule.bytes)%><%=rule.target and link_target(tbl, rule.target) or "-"%><%=rule.protocol%><%=link_iface(rule.inputif)%><%=link_iface(rule.outputif)%><%=rule.source%><%=rule.destination%><%=#rule.options > 0 and luci.util.pcdata(table.concat(rule.options, " ")) or "-"%>
<%:No rules in this chain%>
<%:No chains in this table%>
+


<% end %> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm index 97a2f5ed59..c8ada71569 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/load.htm @@ -248,37 +248,37 @@
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<%:1 Minute Load:%>0<%:Average:%>0<%:Peak:%>0
<%:5 Minute Load:%>0<%:Average:%>0<%:Peak:%>0
<%:15 Minute Load:%>0<%:Average:%>0<%:Peak:%>0
+
+
+
<%:1 Minute Load:%>
+
0
+ +
<%:Average:%>
+
0
+ +
<%:Peak:%>
+
0
+
+
+
<%:5 Minute Load:%>
+
0
+ +
<%:Average:%>
+
0
+ +
<%:Peak:%>
+
0
+
+
+
<%:15 Minute Load:%>
+
0
+ +
<%:Average:%>
+
0
+ +
<%:Peak:%>
+
0
+
+
<%+footer%> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/routes.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/routes.htm index f474c71568..af80371353 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/routes.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/routes.htm @@ -39,28 +39,28 @@
ARP
- - - - - - +
+
+
<%_IPv4-Address%>
+
<%_MAC-Address%>
+
<%:Interface%>
+
<% for _, v in ipairs(ip.neighbors({ family = 4 })) do if v.mac then %> -
- - - - +
+
<%=v.dest%>
+
<%=v.mac%>
+
<%=luci.tools.webadmin.iface_get_network(v.dev) or '(' .. v.dev .. ')'%>
+
<% style = not style end end %> -
<%_IPv4-Address%><%_MAC-Address%><%:Interface%>
<%=v.dest%><%=v.mac%><%=luci.tools.webadmin.iface_get_network(v.dev) or '(' .. v.dev .. ')'%>
+

@@ -69,24 +69,24 @@ <%_Active IPv4-Routes%>
- - - - - - - - +
+
+
<%:Network%>
+
<%:Target%>
+
<%_IPv4-Gateway%>
+
<%:Metric%>
+
<%:Table%>
+
<% for _, v in ipairs(ip.routes({ family = 4, type = 1 })) do %> -
- - - - - - +
+
<%=luci.tools.webadmin.iface_get_network(v.dev) or v.dev%>
+
<%=v.dest%>
+
<%=v.gw%>
+
<%=v.metric or 0%>
+
<%=rtn[v.table] or v.table%>
+
<% style = not style end %> -
<%:Network%><%:Target%><%_IPv4-Gateway%><%:Metric%><%:Table%>
<%=luci.tools.webadmin.iface_get_network(v.dev) or v.dev%><%=v.dest%><%=v.gw%><%=v.metric or 0%><%=rtn[v.table] or v.table%>
+

@@ -99,31 +99,31 @@ <%_Active IPv6-Routes%>
- - - - - - - - +
+
+
<%:Network%>
+
<%:Target%>
+
<%:Source%>
+
<%:Metric%>
+
<%:Table%>
+
<% for _, v in ipairs(ip.routes({ family = 6, type = 1 })) do if v.dest and not v.dest:is6linklocal() then %> -
- - - - - - +
+
<%=luci.tools.webadmin.iface_get_network(v.dev) or '(' .. v.dev .. ')'%>
+
<%=v.dest%>
+
<%=v.from%>
+
<%=v.metric or 0%>
+
<%=rtn[v.table] or v.table%>
+
<% style = not style end end %> -
<%:Network%><%:Target%><%:Source%><%:Metric%><%:Table%>
<%=luci.tools.webadmin.iface_get_network(v.dev) or '(' .. v.dev .. ')'%><%=v.dest%><%=v.from%><%=v.metric or 0%><%=rtn[v.table] or v.table%>
+

@@ -132,27 +132,27 @@ <%:IPv6 Neighbours%>
- - - - - - +
+
+
<%:IPv6-Address%>
+
<%:MAC-Address%>
+
<%:Interface%>
+
<% for _, v in ipairs(ip.neighbors({ family = 6 })) do if v.dest and not v.dest:is6linklocal() and v.mac then %> -
- - - - +
+
<%=v.dest%>
+
<%=v.mac%>
+
<%=luci.tools.webadmin.iface_get_network(v.dev) or '(' .. v.dev .. ')'%>
+
<% style = not style end end %> -
<%:IPv6-Address%><%:MAC-Address%><%:Interface%>
<%=v.dest%><%=v.mac%><%=luci.tools.webadmin.iface_get_network(v.dev) or '(' .. v.dev .. ')'%>
+

diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm b/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm index aa658ff0cb..4211b26471 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_status/wireless.htm @@ -325,28 +325,28 @@
-

- - - - +
+
+
<%:Signal:%>
+
0 <%:dBm%>
-
- +
<%:Average:%>
+
0 <%:dBm%>
- - - - - - +
<%:Peak:%>
+
0 <%:dBm%>
+ +
+
<%:Noise:%>
+
0 <%:dBm%>
-
- +
<%:Average:%>
+
0 <%:dBm%>
- - - -
<%:Signal:%>0 <%:dBm%><%:Average:%>0 <%:dBm%><%:Peak:%>0 <%:dBm%>
<%:Noise:%>0 <%:dBm%><%:Average:%>0 <%:dBm%><%:Peak:%>0 <%:dBm%>
+
<%:Peak:%>
+
0 <%:dBm%>
+
+

@@ -354,17 +354,17 @@
-

- - - - +
+
+
<%:Phy Rate:%>
+
0 MBit/s
-
- +
<%:Average:%>
+
0 MBit/s
- - - -
<%:Phy Rate:%>0 MBit/s<%:Average:%>0 MBit/s<%:Peak:%>0 MBit/s
+
<%:Peak:%>
+
0 MBit/s
+
+
<%+footer%> -- cgit v1.2.3