summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-olsr/luasrc/view/status-olsr/routes.htm
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-11-13 12:34:09 +0000
committerManuel Munz <freifunk@somakoma.de>2011-11-13 12:34:09 +0000
commit32be6cea9305168b303d1e54ec3e658826725ef2 (patch)
tree9f6a62c55adb2570924657a5a4b4327b29518a94 /applications/luci-olsr/luasrc/view/status-olsr/routes.htm
parent2392f40cd2147c2e5d2cf192a6bb4dbac067745f (diff)
applications/luci-olsr: Fix rowstyle, make html valid
Diffstat (limited to 'applications/luci-olsr/luasrc/view/status-olsr/routes.htm')
-rw-r--r--applications/luci-olsr/luasrc/view/status-olsr/routes.htm24
1 files changed, 12 insertions, 12 deletions
diff --git a/applications/luci-olsr/luasrc/view/status-olsr/routes.htm b/applications/luci-olsr/luasrc/view/status-olsr/routes.htm
index 5281f70834..e32b696d58 100644
--- a/applications/luci-olsr/luasrc/view/status-olsr/routes.htm
+++ b/applications/luci-olsr/luasrc/view/status-olsr/routes.htm
@@ -27,9 +27,7 @@ if luci.http.formvalue("status") == "1" then
metric = route.Metric,
etx = tonumber(route.ETX),
color = olsrtools.etx_color(tonumber(route.ETX)),
- rs = i
}
- if i == 1 then i = 0 elseif i == 0 then i = 1 end
end
luci.http.prepare_content("application/json")
luci.http.write_json(rv)
@@ -56,11 +54,11 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
var route = info[idx];
s += String.format(
- '<tr class="cbi-section-table-row cbi-rowstyle-%s">' +
+ '<tr class="cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+'">' +
'<td class="cbi-section-table-cell">%s</td>' +
'<td class="cbi-section-table-cell">' +
'<a href="http://%s/cgi-bin-status.html">%s</a>',
- route.rs, route.dest, route.gw, route.gw
+ route.dest, route.gw, route.gw
)
if (route.hostname)
@@ -94,13 +92,15 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
<legend><%:Overview of currently known routes to other OLSR nodes%></legend>
<table class="cbi-section-table">
- <tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell"><%:Announced network%></th>
- <th class="cbi-section-table-cell"><%:OLSR gateway%></th>
- <th class="cbi-section-table-cell"><%:Interface%></th>
- <th class="cbi-section-table-cell"><%:Metric%></th>
- <th class="cbi-section-table-cell">ETX</th>
- </tr>
+ <thead>
+ <tr class="cbi-section-table-titles">
+ <th class="cbi-section-table-cell"><%:Announced network%></th>
+ <th class="cbi-section-table-cell"><%:OLSR gateway%></th>
+ <th class="cbi-section-table-cell"><%:Interface%></th>
+ <th class="cbi-section-table-cell"><%:Metric%></th>
+ <th class="cbi-section-table-cell">ETX</th>
+ </tr>
+ </thead>
<tbody id="olsrd_routes">
@@ -121,7 +121,7 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
<td class="cbi-section-table-cell" style="background-color:<%=color%>"><%=string.format("%.3f", tonumber(route.ETX) or 0)%></td>
</tr>
<%
- if i == 1 then i = 0 elseif i == 0 then i = 1 end
+ i = ((i % 2) + 1)
end %>
</tbody>
</table>