From 067d7dc9f708d5ebeda1072fb6dc82e960de0d81 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 28 May 2018 14:57:54 +0200 Subject: [PATCH] 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/adblock/blocklist.htm | 24 +- .../view/advanced_reboot/advanced_reboot.htm | 56 +-- .../luci-app-ahcp/luasrc/view/ahcp_status.htm | 46 +-- .../luasrc/view/asterisk/dialplans.htm | 60 +-- .../luasrc/view/asterisk/dialzones.htm | 74 ++-- .../luasrc/view/firewall/cbi_addforward.htm | 66 ++-- .../luasrc/view/firewall/cbi_addrule.htm | 84 ++--- .../luasrc/view/firewall/cbi_addsnat.htm | 54 +-- .../luasrc/view/telephony_status.htm | 33 +- .../luasrc/view/noddos/clients.htm | 76 ++-- .../luasrc/view/ocserv_status.htm | 83 ++--- .../view/freifunk-services/services.htm | 44 +-- .../luasrc/view/status-olsr/hna.htm | 44 +-- .../luasrc/view/status-olsr/interfaces.htm | 40 +- .../luasrc/view/status-olsr/mid.htm | 20 +- .../luasrc/view/status-olsr/neighbors.htm | 80 ++-- .../luasrc/view/status-olsr/overview.htm | 40 +- .../luasrc/view/status-olsr/routes.htm | 58 +-- .../luasrc/view/status-olsr/smartgw.htm | 84 ++--- .../luasrc/view/status-olsr/topology.htm | 36 +- .../view/shadowsocks-libev/add_instance.htm | 20 +- .../luasrc/view/admin_status/splash.htm | 74 ++-- .../luasrc/view/travelmate/stations.htm | 38 +- .../luasrc/view/travelmate/wifi_scan.htm | 40 +- .../luci-app-upnp/luasrc/view/upnp_status.htm | 70 ++-- .../luasrc/view/wireguard.htm | 52 +-- .../luasrc/view/cbi/cell_valuefooter.htm | 2 +- .../luasrc/view/cbi/cell_valueheader.htm | 2 +- .../luci-base/luasrc/view/cbi/tblsection.htm | 54 +-- .../view/admin_network/iface_overview.htm | 32 +- .../view/admin_network/iface_status.htm | 18 +- .../view/admin_network/lease_status.htm | 128 +++---- .../luasrc/view/admin_network/wifi_join.htm | 20 +- .../view/admin_network/wifi_overview.htm | 144 ++++--- .../luasrc/view/admin_network/wifi_status.htm | 18 +- .../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 +-- .../luasrc/view/admin_system/packages.htm | 84 ++--- .../luasrc/view/freifunk/contact.htm | 30 +- .../luasrc/view/freifunk/public_status.htm | 84 ++--- 45 files changed, 1357 insertions(+), 1462 deletions(-) diff --git a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm index b4b62db5f..424a72f6f 100644 --- a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm +++ b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm @@ -51,37 +51,37 @@ table.cbi-section-table td, <%- end %>
<%=self.description%>
- - +
+
<%- if self.sectionhead then -%> -
+
<%=self.sectionhead%>
<%- else -%> - +
 
<%- end -%> <%- for i, k in pairs(self.children) do -%> - + <%- end -%> - + <%- local isempty = true for i, k in ipairs(self:cfgsections()) do section = k isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> - - +
+
<%=k%>
<%- for k, node in ipairs(self.children) do node:render(section, scope or {}) end if not scope.cbid:match("adb_src_cat") then -%> -
+
 
<%- end -%> - + <%- end -%> -
<%=self.sectionhead%> > +
> <%-=k.title-%> -
<%=k%> 
+
diff --git a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm index 0629c84b3..5f7429dfd 100644 --- a/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm +++ b/applications/luci-app-advanced-reboot/luasrc/view/advanced_reboot/advanced_reboot.htm @@ -21,24 +21,24 @@ <%- if device_name then -%>
<%=device_name%><%: Partitions%> - - - - - - - - - - - - - - - - - - - -
<%:Partition%><%:Status%><%:Firmware/OS (Kernel)%><%:Action%>
+
+
+
<%:Partition%>
+
<%:Status%>
+
<%:Firmware/OS (Kernel)%>
+
<%:Action%>
+
+
+
<%=string.format("%X", boot_envvar1_partition_one)%> -
+ +
<%- if boot_envvar1_partition_one == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> -
+ +
<%=partition_one_os%> -
+ +
<%- if boot_envvar1_partition_one == current_partition then -%>
@@ -50,19 +50,19 @@
<%- end -%> -
+ + +
+
<%=string.format("%X", boot_envvar1_partition_two)%> -
+ +
<%- if boot_envvar1_partition_two == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%> -
+ +
<%=partition_two_os%> -
+ +
<%- if boot_envvar1_partition_two == current_partition then -%>
@@ -74,9 +74,9 @@
<%- end -%> -
+ + +
<%- else -%>

<%:Warning: This system does not have two partitions!%>

diff --git a/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm b/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm index 946828953..ab25f862b 100644 --- a/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm +++ b/applications/luci-app-ahcp/luasrc/view/ahcp_status.htm @@ -7,29 +7,21 @@ if (st && tb && tx) { /* clear all rows */ - while( tb.rows.length > 1 ) - tb.deleteRow(1); + while (tb.firstElementChild !== tb.lastElementChild) + tb.removeChild(tb.lastElementChild); - for( var i = 0; i < st.leases.length; i++ ) + for (var i = 0; i < st.leases.length; i++) { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); - - tr.insertCell(-1).innerHTML = st.leases[i].addr; - tr.insertCell(-1).innerHTML = String.format('%t', st.leases[i].age); + tb.appendChild(E('
'.format((i % 2) + 1), [ + E('
', st.leases[i].addr), + E('
', '%t'.format(st.leases[i].age)) + ])); } - if( tb.rows.length == 1 ) - { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 2; - td.innerHTML = '
<%:There are no active leases.%>
'; - } + if (tb.firstElementChild === tb.lastElementChild) + tb.appendChild(E('

<%:There are no active leases.%>
')); - if( st.uid == '00:00:00:00:00:00:00:00' ) + if (st.uid == '00:00:00:00:00:00:00:00') tx.innerHTML = '<%:The AHCP Service is not running.%>'; else tx.innerHTML = String.format('<%:The AHCP Service is running with ID %s.%>', st.uid); @@ -41,13 +33,13 @@
<%:Active AHCP Leases%>

- - - - - - - - -
<%:Address%><%:Age%>

<%:Collecting data...%>
+
+
+
<%:Address%>
+
<%:Age%>
+
+
+

<%:Collecting data...%>
+
+
diff --git a/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm b/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm index 9f644ba07..fb40335f9 100644 --- a/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm +++ b/applications/luci-app-asterisk/luasrc/view/asterisk/dialplans.htm @@ -79,23 +79,23 @@ <% for i, plan in pairs(ast.dialplan.plans()) do %>
- - - - - + + <% local zones_used = { }; local row = 0 %> <% for i, zone in ipairs(plan.zones) do zones_used[zone.name] = true %> - - - - + + <% row = row + 1; end %> <% local boxes_used = { } %> <% for ext, box in luci.util.kspairs(plan.voicemailboxes) do boxes_used[box.id] = true %> - - - - + + <% row = row + 1; end %> <% local rooms_used = { } %> <% for ext, room in luci.util.kspairs(plan.meetmerooms) do rooms_used[room.room] = true %> - - - - + + <% row = row + 1; end %> - - - + + -
+
+
+
Dialplan <%=plan.name%> -
+ +
Remove this dialplan -
+
+
└ Dialzone <%=zone.name%> (<%=zone.description%>)

Lines: @@ -107,24 +107,24 @@ Matches: <%=format_matches(zone)%>

-
+ +
+
+
└ Voicemailbox <%=box.id%> (<%=box.name%>)

Owner: <%=box.name%> | @@ -132,44 +132,44 @@ Pager: <%=#box.page > 0 and box.page or 'n/a'%>
Matches: <%=format_matches(ext)%>

-
+ +
+
+
└ MeetMe Room <%=room.room%> <% if room.description and #room.description > 0 then %> (<%=room.description%>)<% end %>

Matches: <%=format_matches(ext)%>

-
+ +
+
+

Add Dialzone:
@@ -213,10 +213,10 @@

-
+
diff --git a/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm b/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm index ffdbbcf35..e48da608a 100644 --- a/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm +++ b/applications/luci-app-asterisk/luasrc/view/asterisk/dialzones.htm @@ -66,59 +66,59 @@
- - - - - - - - - - - - - + + + +
+
Name
+
Prepend
+
- Match
+
Trunk
+
Description
+
+
<% for i, rule in pairs(ast.dialzone.zones()) do %> - - - - - - - - + + <% end %> -
+
+
+

Dialzone Overview

-
NamePrepend- MatchTrunkDescription
+
+
<%=rule.name%> -
+ +
<% for _ in ipairs(rule.matches) do %> <%=rule.addprefix and digit_pattern(rule.addprefix)%> 
<% end %> -
+ +
<% for _, m in ipairs(rule.matches) do %> <%=rule.localprefix and "%s " % digit_pattern(rule.localprefix)%> <%=digit_pattern(m)%>
<% end %> -
+ +
<%=ast.tools.hyperlinks( rule.trunks, function(v) return luci.dispatcher.build_url("admin", "asterisk", "trunks", "%s") % v:lower() end )%> -
+ +
<%=rule.description or rule.name%> -
+ +
+

@@ -133,26 +133,26 @@
Invalid name given!
<% end -%> - - - - - -
+
+
+




-
+ +

-
+
+ +
diff --git a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm index b3079f3a4..279b6e06d 100644 --- a/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm +++ b/applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm @@ -20,58 +20,58 @@ -%>

- - - - - - - - - - - - - - - - - - - - - - - - -
<%:New port forward%>:
<%:Name%><%:Protocol%><%:External zone%><%:External port%><%:Internal zone%><%:Internal IP address%><%:Internal port%>
+
+
+
<%:New port forward%>:
+
+
+
<%:Name%>
+
<%:Protocol%>
+
<%:External zone%>
+
<%:External port%>
+
<%:Internal zone%>
+
<%:Internal IP address%>
+
<%:Internal port%>
+
+
+
+
-
+ +
-
+ +
-
+ +
-
+ +
-
+ +
0, "data-choices", {keys, vals}) %>/> -
+ +
-
+ +
-
+
+ + - - - - - - -
+
+
+
+

? -
+ +
<%:Collecting data...%> -
+ + + <%+cbi/valuefooter%> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm index 28a37dcd9..9005279a4 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/lease_status.htm @@ -20,10 +20,10 @@ if (st && st[0] && tb) { /* clear all rows */ - while( tb.rows.length > 1 ) - tb.deleteRow(1); + while (tb.firstElementChild !== tb.lastElementChild) + tb.removeChild(tb.lastElementChild); - for( var i = 0; i < st[0].length; i++ ) + for (var i = 0; i < st[0].length; i++) { var timestr; @@ -34,24 +34,16 @@ else timestr = String.format('%t', st[0][i].expires); - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + ((i % 2) + 1); - - tr.insertCell(-1).innerHTML = st[0][i].hostname ? st[0][i].hostname : '?'; - tr.insertCell(-1).innerHTML = st[0][i].ipaddr; - tr.insertCell(-1).innerHTML = st[0][i].macaddr; - tr.insertCell(-1).innerHTML = timestr; + tb.appendChild(E('
'.format((i % 2) + 1), [ + E('
', st[0][i].hostname || '?'), + E('
', st[0][i].ipaddr), + E('
', st[0][i].macaddr), + E('
', timestr) + ])); } - if( tb.rows.length == 1 ) - { - var tr = tb.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 4; - td.innerHTML = '
<%:There are no active leases.%>
'; - } + if (tb.firstElementChild === tb.lastElementChild) + tb.appendChild(E('

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

<%:There are no active leases.%>
')); } } ); @@ -110,30 +96,30 @@
<%:Active DHCP Leases%> - - - - - - - - - - -
<%:Hostname%><%:IPv4-Address%><%:MAC-Address%><%:Leasetime remaining%>

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

<%:Collecting data...%>
+
+
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm index 3533c6fa4..e9cfb3e85 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm @@ -91,24 +91,24 @@
- +
<% for i, net in ipairs(scanlist(3)) do net.encryption = net.encryption or { } %> -
- - - - + + <% end %> -
+
+

<%=percent_wifi_signal(net)%>%
-
+ +
<%=net.ssid and utl.pcdata(net.ssid) or "%s" % translate("hidden")%>
Channel: <%=net.channel%> | Mode: <%=net.mode%> | BSSID: <%=net.bssid%> | Encryption: <%=format_wifi_encryption(net.encryption)%> -
+ +
@@ -128,11 +128,11 @@
-
+
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm index 4465095ff..31f1fed81 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview.htm @@ -195,8 +195,8 @@ { var assoctable = document.getElementById('iw-assoclist'); if (assoctable) - while (assoctable.rows.length > 1) - assoctable.rows[1].parentNode.removeChild(assoctable.rows[1]); + while (assoctable.firstElementChild !== assoctable.lastElementChild) + assoctable.removeChild(assoctable.lastElementChild); var devup = { }; var rowstyle = 1; @@ -293,7 +293,7 @@ if (assoctable) { var assoclist = [ ]; - for( var bssid in iw.assoclist ) + for (var bssid in iw.assoclist) { assoclist.push(iw.assoclist[bssid]); assoclist[assoclist.length-1].bssid = bssid; @@ -301,11 +301,8 @@ assoclist.sort(function(a, b) { a.bssid < b.bssid }); - for( var j = 0; j < assoclist.length; j++ ) + for (var j = 0; j < assoclist.length; j++) { - var tr = assoctable.insertRow(-1); - tr.className = 'cbi-section-table-row cbi-rowstyle-' + rowstyle; - var icon; var q = (-1 * (assoclist[j].noise - assoclist[j].signal)) / 5; if (q < 1) @@ -319,48 +316,35 @@ else icon = "<%=resource%>/icons/signal-75-100.png"; - tr.insertCell(-1).innerHTML = String.format( - ' %h', - iw.device.name, iw.ifname - ); - - tr.insertCell(-1).innerHTML = nowrap(String.format('%h', iw.ssid ? iw.ssid : '?')); - tr.insertCell(-1).innerHTML = assoclist[j].bssid; - - var host = hosts[assoclist[j].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[j].signal, assoclist[j].noise, assoclist[j].signal - assoclist[j].noise, - icon, - assoclist[j].signal, assoclist[j].noise - ); - - tr.insertCell(-1).innerHTML = nowrap(wifirate(assoclist[j], true)) + '
' + nowrap(wifirate(assoclist[j], false)); + var host = hosts[assoclist[j].bssid], + name = host ? (host.name || host.ipv4 || host.ipv6) : null, + hint = (host && host.name && (host.ipv4 || host.ipv6)) ? (host.ipv4 || host.ipv6) : null; + + assoctable.appendChild(E('
'.format(rowstyle), [ + E('
%h
' + .format(iw.device.name, iw.ifname)), + E('
%h
' + .format(iw.ssid || '?')), + E('
%h
' + .format(assoclist[j].bssid)), + E('
', hint ? '
%h (%h)
' + .format(name || '?', hint) : (name || '?')), + E('
%d / %d <%:dBm%>
' + .format(assoclist[j].signal, assoclist[j].noise, assoclist[j].signal - assoclist[j].noise, icon, assoclist[j].signal, assoclist[j].noise)), + E('
', [ + E('', wifirate(assoclist[j], true)), + E('
'), + E('', wifirate(assoclist[j], false)) + ]) + ])); rowstyle = (rowstyle == 1) ? 2 : 1; } } } - if (assoctable && assoctable.rows.length == 1) - { - var tr = assoctable.insertRow(-1); - tr.className = 'cbi-section-table-row'; - - var td = tr.insertCell(-1); - td.colSpan = 8; - td.innerHTML = '
<%:No information available%>'; - } + if (assoctable && assoctable.firstElementChild === assoctable.lastElementChild) + assoctable.appendChild(E('

<%:No information available%>
')); for (var dev in devup) { @@ -386,15 +370,17 @@ <% for _, dev in ipairs(devices) do local nets = dev:get_wifinets() %>
- +
-
- - - - + + <% if #nets > 0 then %> <% for i, net in ipairs(nets) do %> - - - - - - + + <% end %> <% else %> - - - - + + <% end %> -
+
+
+ +
+
<%=guess_wifi_hw(dev)%> (<%=dev:name()%>)
-
+ +
@@ -405,38 +391,36 @@
-
+
+
0% -
+ +
<%:Collecting data...%> -
+ +
-
+
+
<%:No network configured on this device%> -
+
<% end %> @@ -445,21 +429,21 @@

<%:Associated Stations%>

- - - - - - - - - - - - -
<%:SSID%><%:MAC-Address%><%:Host%><%:Signal%> / <%:Noise%><%:RX Rate%> / <%:TX Rate%>
+
+
+
+
<%:SSID%>
+
<%:MAC-Address%>
+
<%:Host%>
+
<%:Signal%> / <%:Noise%>
+
<%:RX Rate%> / <%:TX Rate%>
+
+
+
<%:Collecting data...%> -
+
+
+
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm index 04687f38e..85468252e 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_status.htm @@ -62,17 +62,17 @@ ); //]]> - - - - - - -
+
+
+
+

0% -
+ +
<%:Collecting data...%> -
+
+
+
<%+cbi/valuefooter%> 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 33bbee784..db1d0b888 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 b7ebc4145..30d93f78b 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 5e6e494ad..a72936f32 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 3f4b83b80..ced4d5f77 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 97a2f5ed5..c8ada7156 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 f474c7156..af8037135 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 aa658ff0c..4211b2647 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%> diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm b/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm index 88e0fffd9..4944a232b 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_system/packages.htm @@ -128,34 +128,34 @@ end <% if display ~= "available" then %>
- - - - - - +
+
+
 
+
<%:Package name%>
+
<%:Version%>
+
<% local empty = true; luci.model.ipkg.list_installed(querypat, function(n, v, s, d) empty = false; filter[n] = true %> -
- - - - + +
<%=luci.util.pcdata(n)%>
+
<%=luci.util.pcdata(v)%>
+ <% end) %> <% if empty then %> - - - - - +
+
 
+
<%:none%>
+
<%:none%>
+
<% end %> -
 <%:Package name%><%:Version%>
+ <%=luci.util.pcdata(n)%><%=luci.util.pcdata(v)%>
 <%:none%><%:none%>
+
<% else %>
@@ -168,40 +168,40 @@ end
<% end %> - - - - - - - - +
+
+
 
+
<%:Package name%>
+
<%:Version%>
+
<%:Size (.ipk)%>
+
<%:Description%>
+
<% local empty = true; opkg_list(querypat or letterpat, function(n, v, s, d) if filter[n] then return end; empty = false %> -
- - - - - - + +
<%=luci.util.pcdata(n)%>
+
<%=luci.util.pcdata(v)%>
+
<%=luci.util.pcdata(s)%>
+
<%=luci.util.pcdata(d)%>
+ <% end) %> <% if empty then %> - - - - - - - +
+
 
+
<%:none%>
+
<%:none%>
+
<%:none%>
+
<%:none%>
+
<% end %> -
 <%:Package name%><%:Version%><%:Size (.ipk)%><%:Description%>
+ <%=luci.util.pcdata(n)%><%=luci.util.pcdata(v)%><%=luci.util.pcdata(s)%><%=luci.util.pcdata(d)%>
 <%:none%><%:none%><%:none%><%:none%>
+
<% if not querypat then %>
<% end %> diff --git a/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm b/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm index 1add595c6..dca35376c 100644 --- a/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm +++ b/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm @@ -31,33 +31,33 @@ end
<%:Operator%> - - - - - - -
<%:Nickname%>:<%=nickname%>
<%:Realname%>:<%=name%>
<%:Homepage%>: +
+
<%:Nickname%>:
<%=nickname%>
+
<%:Realname%>:
<%=name%>
+
<%:Homepage%>:
<% for k, v in ipairs(homepage) do %> <%=v%>
<% end %> -
<%:E-Mail%>:<%=mail%>
<%:Phone%>:<%=phone%>
+
+
<%:E-Mail%>:
+
<%:Phone%>:
<%=phone%>
+
<%:Location%> - - - -
<%:Location%>:<%=location%>
<%:Coordinates%>:<%=lat%> <%=lon%> ("><%:Show on map%>)
+
+
<%:Location%>:
<%=location%>
+
<%:Coordinates%>:
<%=lat%> <%=lon%> ("><%:Show on map%>)
+
<% if note then %>
<%:Notice%> - - -
<%=note%>
+
+
<%=note%>
+
<%end%> diff --git a/modules/luci-mod-freifunk/luasrc/view/freifunk/public_status.htm b/modules/luci-mod-freifunk/luasrc/view/freifunk/public_status.htm index 1dc1d8b0d..a71926141 100644 --- a/modules/luci-mod-freifunk/luasrc/view/freifunk/public_status.htm +++ b/modules/luci-mod-freifunk/luasrc/view/freifunk/public_status.htm @@ -246,17 +246,17 @@ end
- - - - - - - - - - - +
+
+
<%:Signal%>
+
<%:Bitrate%>
+
<%:SSID%>
+
<%:BSSID%>
+
<%:Channel%>
+
<%:Mode%>
+
<%:TX%>-<%:Power%>
+
<%:Interface%>
+
<% for _, dev in ipairs(devices) do local net @@ -301,20 +301,20 @@ end end local interface = net.iwinfo.ifname or "N/A" %> -
- - - - - - - - - +
+
<%=signal_string%>
+
<%=bitrate%>
+
<%=ssid%>
+
<%=bssid%>
+
<%=chan%>
+
<%=mode%>
+
<%=txpwr%>
+
<%=interface%>
+
<% end end end %> -
<%:Signal%><%:Bitrate%><%:SSID%><%:BSSID%><%:Channel%><%:Mode%><%:TX%>-<%:Power%><%:Interface%>
<%=signal_string%><%=bitrate%><%=ssid%><%=bssid%><%=chan%><%=mode%><%=txpwr%><%=interface%>
+
@@ -328,35 +328,35 @@ end <% if not def4 and not def6 then %> <%:No default routes known.%> <%else%> - - - - - - - +
+
+
<%:Network%>
+
<%:Interface%>
+
<%:Gateway%>
+
<%:Metric%>
+
<% if def4 then %> -
- - - - - +
+
<%=def4.dest%>
+
<%=def4.dev%>
+
<%=def4.gateway%>
+
<%=def4.metr%>
+
<% end if def6 then %> - - - - - - +
+
<%=def6.dest%>
+
<%=def6.dev%>
+
<%=def6.gateway%>
+
<%=def6.metr%>
+
<% end %> -
<%:Network%><%:Interface%><%:Gateway%><%:Metric%>
<%=def4.dest%><%=def4.dev%><%=def4.gateway%><%=def4.metr%>
<%=def6.dest%><%=def6.dev%><%=def6.gateway%><%=def6.metr%>
+
<% end %>
-- 2.25.1