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/status-olsr/routes.htm | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm') diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm index 8e46daa022..c75b94fcef 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm @@ -50,9 +50,9 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, var route = info[idx]; s += String.format( - '' + - '%s/%s' + - '' + + '
' + + '
%s/%s
' + + '
' + '%s', route.proto, route.dest, route.genmask, route.gw, route.gw ) @@ -72,11 +72,11 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( - '' + - '%s' + - '%s' + - '%s' + - '', + '
' + + '
%s
' + + '
%s
' + + '
%s
' + + '
', route.interface, route.metric, route.color, route.etx || '?' ); } @@ -96,27 +96,27 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
<%:Overview of currently known routes to other OLSR nodes%> - - - - - - - - - - +
+
+
+
<%:Announced network%>
+
<%:OLSR gateway%>
+
<%:Interface%>
+
<%:Metric%>
+
ETX
+
+
-
+
<% for k, route in ipairs(routes) do ETX = tonumber(route.rtpMetricCost)/1024 or '0' color = olsrtools.etx_color(ETX) %> -
- - - - - - + +
<%=route.networkInterface%>
+
<%=route.metric%>
+
<%=string.format("%.3f", ETX)%>
+ <% i = ((i % 2) + 1) end %> - -
<%:Announced network%><%:OLSR gateway%><%:Interface%><%:Metric%>ETX
<%=route.destination%>/<%=route.genmask%> +
+
<%=route.destination%>/<%=route.genmask%>
+
<% if route.proto == '6' then %> <%=route.gateway%> <% else %> @@ -125,16 +125,16 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, <% if route.hostname then %> / <%=route.hostname%> <% end %> -
<%=route.networkInterface%><%=route.metric%><%=string.format("%.3f", ETX)%>
+ + <%+status-olsr/legend%>
-- cgit v1.2.3