diff options
author | Steven Barth <steven@midlink.org> | 2008-06-06 15:50:21 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-06 15:50:21 +0000 |
commit | 932280107232706c4605e475a6d969f0adf2e22d (patch) | |
tree | ffc20d5818255da0cb9a1d3b7453b747702beacb /applications/luci-olsr/luasrc/view/status-olsr/routes.htm | |
parent | dd9606825da5d73883b8313f5af905ea1b2a4d7d (diff) |
* Separated OLSR pages into separate application pack
* Minor bugfixes and enhancements
Diffstat (limited to 'applications/luci-olsr/luasrc/view/status-olsr/routes.htm')
-rw-r--r-- | applications/luci-olsr/luasrc/view/status-olsr/routes.htm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/applications/luci-olsr/luasrc/view/status-olsr/routes.htm b/applications/luci-olsr/luasrc/view/status-olsr/routes.htm new file mode 100644 index 0000000000..f3a0fd3366 --- /dev/null +++ b/applications/luci-olsr/luasrc/view/status-olsr/routes.htm @@ -0,0 +1,36 @@ +<%+header%> +<h1><%:olsrlinks OLSR-Routen%></h1> +<br /> +<table cellspacing="0" cellpadding="6"> +<tr> +<th><%:destination Ziel%></th> +<th><%:gateway Gateway%></th> +<th><%:interface Schnittstelle%></th> +<th><%:metric Metrik%></th> +<th>ETX</th> +</tr> +<% for k, route in ipairs(routes) do + local color = "#bb3333" + + route.ETX = tonumber(route.ETX) + if route.ETX == 0 then + color = "#bb3333" + elseif route.ETX < 4 then + color = "#00cc00" + elseif route.ETX < 10 then + color = "#ffcb05" + elseif route.ETX < 100 then + color = "#ff6600" + end +%> +<tr> +<td><%=route.Destination%></td> +<td><%=route.Gateway%></td> +<td><%=route.Interface%></td> +<td><%=route.Metric%></td> +<td style="background-color:<%=color%>"><%=route.ETX%></td> +</tr> +<% end %> +</table> +<br /> +<%+footer%>
\ No newline at end of file |