applications/luci-olsr: Fixed to work with 0.5.6
[project/luci.git] / applications / luci-olsr / luasrc / view / status-olsr / topology.htm
index 6ad9f5c673e783177349190a9bcd389aef5b785a..7871e133e3163eaedcc9662c74cd20e7ff45739e 100644 (file)
@@ -9,7 +9,11 @@
 <th>ILQ</th>
 <th>ETX</th>
 </tr>
-<% for k, route in ipairs(routes) do %>
+<% for k, route in ipairs(routes) do 
+       if route.Linkcost then
+               route.LQ, route.ILQ, route.ETX = route.Linkcost:match("(.*)/(.*)\t(.*)")
+       end
+%>
 <tr>
 <td><a href="http://<%=route["Destination IP"]%>"><%=route["Destination IP"]%></a></td>
 <td><a href="http://<%=route["Last hop IP"]%>"><%=route["Last hop IP"]%></a></td>