summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm
diff options
context:
space:
mode:
authorpmelange <isprotejesvalkata@gmail.com>2018-11-18 14:26:23 +0100
committerpmelange <isprotejesvalkata@gmail.com>2018-12-06 20:57:35 +0100
commitd2bda6c34bada854893ddf935ed3794cfab2579b (patch)
tree4d1d9d54b4d494577a0d35b117e08275be1bd0b7 /applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm
parent4974ddb1f1d2e9d8870f6b907876c39a55a436a1 (diff)
luci-app-olsr: reenable the "auto refresh" feature
Signed-off-by: pmelange <isprotejesvalkata@gmail.com>
Diffstat (limited to 'applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm')
-rw-r--r--applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm17
1 files changed, 12 insertions, 5 deletions
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 ba738c016d..624047f40c 100644
--- a/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm
+++ b/applications/luci-app-olsr/luasrc/view/status-olsr/routes.htm
@@ -13,7 +13,7 @@ local i = 1
if luci.http.formvalue("status") == "1" then
local rv = {}
for k, route in ipairs(routes) do
- local ETX = string.format("%.3f", tonumber(route.rtpMetricCost)/1024 or 0)
+ local ETX = string.format("%.3f", tonumber(route.etx) or 0)
rv[#rv+1] = {
hostname = route.hostname,
dest = route.destination,
@@ -43,7 +43,14 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
var rt = document.getElementById('olsrd_routes');
if (rt)
{
- var s = '';
+ var s = '<div class="tr cbi-section-table-cell">' +
+ '<div class="th cbi-section-table-cell"><%:Announced network%></div>' +
+ '<div class="th cbi-section-table-cell"><%:OLSR gateway%></div>' +
+ '<div class="th cbi-section-table-cell"><%:Interface%></div>' +
+ '<div class="th cbi-section-table-cell"><%:Metric%></div>' +
+ '<div class="th cbi-section-table-cell">ETX</div>' +
+ '</div>';
+
for (var idx = 0; idx < info.length; idx++)
{
var route = info[idx];
@@ -57,7 +64,7 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
)
if (route.hostname) {
- if (hna.proto == '6') {
+ if (route.proto == '6') {
s += String.format(
' / <a href="http://[%s]/cgi-bin-status.html">%s</a>',
route.hostname, route.hostname || '?'
@@ -95,8 +102,8 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 },
<fieldset class="cbi-section">
<legend><%:Overview of currently known routes to other OLSR nodes%></legend>
-<div class="table cbi-section-table">
- <div class="tr cbi-section-table-titles">
+<div class="table cbi-section-table" id="olsrd_routes">
+ <div class="tr cbi-section-table-cell">
<div class="th cbi-section-table-cell"><%:Announced network%></div>
<div class="th cbi-section-table-cell"><%:OLSR gateway%></div>
<div class="th cbi-section-table-cell"><%:Interface%></div>