diff options
Diffstat (limited to 'applications/luci-app-olsr/luasrc')
16 files changed, 206 insertions, 177 deletions
diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua index c5fb2b2a53..11e27d7c00 100644 --- a/applications/luci-app-olsr/luasrc/controller/olsr.lua +++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua @@ -87,8 +87,8 @@ function action_json() local v4_port = tonumber(uci:get("olsrd", "olsrd_jsoninfo", "port") or "") or 9090 local v6_port = tonumber(uci:get("olsrd6", "olsrd_jsoninfo", "port") or "") or 9090 - jsonreq4 = utl.exec("(echo /status | nc 127.0.0.1 %d | sed -n '/^[}{ ]/p') 2>/dev/null" % v4_port) - jsonreq6 = utl.exec("(echo /status | nc ::1 %d | sed -n '/^[}{ ]/p') 2>/dev/null" % v6_port) + jsonreq4 = utl.exec("(echo /all | nc 127.0.0.1 %d | sed -n '/^[}{ ]/p') 2>/dev/null" % v4_port) + jsonreq6 = utl.exec("(echo /all | nc ::1 %d | sed -n '/^[}{ ]/p') 2>/dev/null" % v6_port) http.prepare_content("application/json") if not jsonreq4 or jsonreq4 == "" then jsonreq4 = "{}" @@ -300,7 +300,7 @@ function action_mid() local function compare(a,b) if a.proto == b.proto then - return a.ipAddress < b.ipAddress + return a.main.ipAddress < b.main.ipAddress else return a.proto < b.proto end @@ -318,18 +318,21 @@ function action_smartgw() local function compare(a,b) if a.proto == b.proto then - return a.tcPathCost < b.tcPathCost + return a.cost < b.cost else return a.proto < b.proto end end - table.sort(data, compare) + table.sort(data.ipv4, compare) + table.sort(data.ipv6, compare) luci.template.render("status-olsr/smartgw", {gws=data, has_v4=has_v4, has_v6=has_v6}) end function action_interfaces() local data, has_v4, has_v6, error = fetch_jsoninfo('interfaces') + local ntm = require "luci.model.network".init() + if error then return end @@ -338,6 +341,13 @@ function action_interfaces() return a.proto < b.proto end + for k, v in ipairs(data) do + local interface = ntm:get_status_by_address(v.olsrInterface.ipAddress) + if interface then + v.interface = interface + end + end + table.sort(data, compare) luci.template.render("status-olsr/interfaces", {iface=data, has_v4=has_v4, has_v6=has_v6}) end diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd.lua index a075bcf26d..90a615699a 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd.lua @@ -259,7 +259,7 @@ function lqmult.validate(self, value) local host = val[1] local mult = val[2] if not host or not mult then - return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) seperated by space.") + return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) separated by space.") end if not (host == "default" or ip.IPv4(host) or ip.IPv6(host)) then return nil, translate("Can only be a valid IPv4 or IPv6 address or 'default'") diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd6.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd6.lua index 0007e673e2..0206b67dc0 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd6.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrd6.lua @@ -253,7 +253,7 @@ function lqmult.validate(self, value) local host = val[1] local mult = val[2] if not host or not mult then - return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) seperated by space.") + return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) separated by space.") end if not (host == "default" or ip.IPv6(host)) then return nil, translate("Can only be a valid IPv6 address or 'default'") diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface.lua index d6b7cd16a6..7de2ad9b44 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface.lua @@ -84,7 +84,7 @@ function lqmult.validate(self, value) local host = val[1] local mult = val[2] if not host or not mult then - return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) seperated by space.") + return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) separated by space.") end if not (host == "default" or ip.IPv4(host) or ip.IPv6(host)) then return nil, translate("Can only be a valid IPv4 or IPv6 address or 'default'") diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface6.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface6.lua index 2f0fa6c38d..00f242df1b 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface6.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdiface6.lua @@ -84,7 +84,7 @@ function lqmult.validate(self, value) local host = val[1] local mult = val[2] if not host or not mult then - return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) seperated by space.") + return nil, translate("LQMult requires two values (IP address or 'default' and multiplicator) separated by space.") end if not (host == "default" or ip.IPv6(host)) then return nil, translate("Can only be a valid IPv6 address or 'default'") diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua index 43d6a08ad1..59e99c867f 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins.lua @@ -62,7 +62,7 @@ if arg[1] then local knownPlParams = { - ["olsrd_bmf.so.1.5.3"] = { + ["olsrd_bmf"] = { { Value, "BmfInterface", "bmf0" }, { Value, "BmfInterfaceIp", "10.10.10.234/24" }, { Flag, "DoLocalBroadcast", "no" }, @@ -73,19 +73,19 @@ if arg[1] then { DynamicList, "NonOlsrIf", "br-lan" } }, - ["olsrd_dyn_gw.so.0.4"] = { + ["olsrd_dyn_gw"] = { { Value, "Interval", "40" }, { DynamicList, "Ping", "141.1.1.1" }, { DynamicList, "HNA", "192.168.80.0/24", IpMask2Cidr, Cidr2IpMask } }, - ["olsrd_httpinfo.so.0.1"] = { + ["olsrd_httpinfo"] = { { Value, "port", "80" }, { DynamicList, "Host", "163.24.87.3" }, { DynamicList, "Net", "0.0.0.0/0", Cidr2IpMask } }, - ["olsrd_nameservice.so.0.3"] = { + ["olsrd_nameservice"] = { { DynamicList, "name", "my-name.mesh" }, { DynamicList, "hosts", "1.2.3.4 name-for-other-interface.mesh" }, { Value, "suffix", ".olsr" }, @@ -109,7 +109,7 @@ if arg[1] then { Value, "macs_change_script", "/path/to/script" } }, - ["olsrd_quagga.so.0.2.2"] = { + ["olsrd_quagga"] = { { StaticList, "redistribute", { "system", "kernel", "connect", "static", "rip", "ripng", "ospf", "ospf6", "isis", "bgp", "hsls" @@ -119,40 +119,40 @@ if arg[1] then { Value, "Distance", Range(0,255) } }, - ["olsrd_secure.so.0.5"] = { + ["olsrd_secure"] = { { Value, "Keyfile", "/etc/private-olsr.key" } }, - ["olsrd_txtinfo.so.0.1"] = { + ["olsrd_txtinfo"] = { { Value, "accept", "127.0.0.1" } }, - ["olsrd_jsoninfo.so.0.0"] = { + ["olsrd_jsoninfo"] = { { Value, "accept", "127.0.0.1" }, { Value, "port", "9090" }, { Value, "UUIDFile", "/etc/olsrd/olsrd.uuid" }, }, - ["olsrd_watchdog.so.0.1"] = { + ["olsrd_watchdog"] = { { Value, "file", "/var/run/olsrd.watchdog" }, { Value, "interval", "30" } }, - ["olsrd_mdns.so.1.0.0"] = { + ["olsrd_mdns"] = { { DynamicList, "NonOlsrIf", "lan" } }, - ["olsrd_p2pd.so.0.1.0"] = { + ["olsrd_p2pd"] = { { DynamicList, "NonOlsrIf", "lan" }, { Value, "P2pdTtl", "10" } }, - ["olsrd_arprefresh.so.0.1"] = {}, - ["olsrd_dot_draw.so.0.3"] = {}, - ["olsrd_dyn_gw_plain.so.0.4"] = {}, - ["olsrd_pgraph.so.1.1"] = {}, - ["olsrd_tas.so.0.1"] = {} + ["olsrd_arprefresh"] = {}, + ["olsrd_dot_draw"] = {}, + ["olsrd_dyn_gw_plain"] = {}, + ["olsrd_pgraph"] = {}, + ["olsrd_tas"] = {} } @@ -227,6 +227,7 @@ else -- create a loadplugin section for each found plugin for v in fs.dir("/usr/lib") do if v:sub(1, 6) == "olsrd_" then + v = string.match(v, "^(olsrd.*)%.so%..*") if not plugins[v] then mpi.uci:section( "olsrd", "LoadPlugin", nil, diff --git a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua index d1c68be24b..9873b0269a 100644 --- a/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua +++ b/applications/luci-app-olsr/luasrc/model/cbi/olsr/olsrdplugins6.lua @@ -62,7 +62,7 @@ if arg[1] then local knownPlParams = { - ["olsrd_bmf.so.1.5.3"] = { + ["olsrd_bmf"] = { { Value, "BmfInterface", "bmf0" }, { Value, "BmfInterfaceIp", "10.10.10.234/24" }, { Flag, "DoLocalBroadcast", "no" }, @@ -73,19 +73,19 @@ if arg[1] then { DynamicList, "NonOlsrIf", "br-lan" } }, - ["olsrd_dyn_gw.so.0.4"] = { + ["olsrd_dyn_gw"] = { { Value, "Interval", "40" }, { DynamicList, "Ping", "141.1.1.1" }, { DynamicList, "HNA", "192.168.80.0/24", IpMask2Cidr, Cidr2IpMask } }, - ["olsrd_httpinfo.so.0.1"] = { + ["olsrd_httpinfo"] = { { Value, "port", "80" }, { DynamicList, "Host", "163.24.87.3" }, { DynamicList, "Net", "0.0.0.0/0", Cidr2IpMask } }, - ["olsrd_nameservice.so.0.3"] = { + ["olsrd_nameservice"] = { { DynamicList, "name", "my-name.mesh" }, { DynamicList, "hosts", "1.2.3.4 name-for-other-interface.mesh" }, { Value, "suffix", ".olsr" }, @@ -109,7 +109,7 @@ if arg[1] then { Value, "macs_change_script", "/path/to/script" } }, - ["olsrd_quagga.so.0.2.2"] = { + ["olsrd_quagga"] = { { StaticList, "redistribute", { "system", "kernel", "connect", "static", "rip", "ripng", "ospf", "ospf6", "isis", "bgp", "hsls" @@ -119,40 +119,40 @@ if arg[1] then { Value, "Distance", Range(0,255) } }, - ["olsrd_secure.so.0.5"] = { + ["olsrd_secure"] = { { Value, "Keyfile", "/etc/private-olsr.key" } }, - ["olsrd_txtinfo.so.0.1"] = { + ["olsrd_txtinfo"] = { { Value, "accept", "::1/128" } }, - ["olsrd_jsoninfo.so.0.0"] = { + ["olsrd_jsoninfo"] = { { Value, "accept", "::1/128" }, { Value, "port", "9090" }, { Value, "UUIDFile", "/etc/olsrd/olsrd.uuid.ipv6" }, }, - ["olsrd_watchdog.so.0.1"] = { + ["olsrd_watchdog"] = { { Value, "file", "/var/run/olsrd.watchdog.ipv6" }, { Value, "interval", "30" } }, - ["olsrd_mdns.so.1.0.0"] = { + ["olsrd_mdns.so"] = { { DynamicList, "NonOlsrIf", "lan" } }, - ["olsrd_p2pd.so.0.1.0"] = { + ["olsrd_p2pd.so"] = { { DynamicList, "NonOlsrIf", "lan" }, { Value, "P2pdTtl", "10" } }, - ["olsrd_arprefresh.so.0.1"] = {}, - ["olsrd_dot_draw.so.0.3"] = {}, - ["olsrd_dyn_gw_plain.so.0.4"] = {}, - ["olsrd_pgraph.so.1.1"] = {}, - ["olsrd_tas.so.0.1"] = {} + ["olsrd_arprefresh"] = {}, + ["olsrd_dot_draw"] = {}, + ["olsrd_dyn_gw_plain"] = {}, + ["olsrd_pgraph"] = {}, + ["olsrd_tas"] = {} } @@ -227,6 +227,7 @@ else -- create a loadplugin section for each found plugin for v in fs.dir("/usr/lib") do if v:sub(1, 6) == "olsrd_" then + v=string.match(v, "^(olsrd_.*)%.so%..*") if not plugins[v] then mpi.uci:section( "olsrd6", "LoadPlugin", nil, diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm index 1ee763e119..213013f22c 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/common_js.htm @@ -9,7 +9,7 @@ function css(selector, property, value) { } window.onload = function() { - buttons = '<input type="button" name="show-proto-4" id="show-proto-4" class="cbi-button cbi-button-apply" style="margin-right: 5px" value="<%:Hide IPv4%>">' + var buttons = '<input type="button" name="show-proto-4" id="show-proto-4" class="cbi-button cbi-button-apply" style="margin-right: 5px" value="<%:Hide IPv4%>">' buttons += '<input type="button" name="show-proto-6" id="show-proto-6" class="cbi-button cbi-button-apply" value="<%:Hide IPv6%>">' document.getElementById('togglebuttons').innerHTML = buttons; diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm index 1c178f1810..34cf563363 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/hna.htm @@ -35,7 +35,12 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, var hnadiv = document.getElementById('olsrd_hna'); if (hnadiv) { - var s = ''; + var s = '<div class="tr cbi-section-table-titles">' + + '<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"><%:Validity Time%></div>' + + '</div>'; + for (var idx = 0; idx < info.length; idx++) { var hna = info[idx]; @@ -47,12 +52,14 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, linkgw = '<a href="http://' + hna.gateway + '/cgi-bin-status.html">' + hna.gateway + '</a>' } + var validity; if (hna.validityTime != undefined) { validity = hna.validityTime + 's' } else { validity = '-' } + var hostname; if (hna.hostname != undefined) { hostname = ' / <a href="http://' + hna.hostname + '/cgi-bin-status.html">' + hna.hostname + '</a>' } else { @@ -60,9 +67,9 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>', hna.destination + '/' + hna.genmask, linkgw + hostname, validity + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>', hna.destination + '/' + hna.genmask, linkgw + hostname, validity ) s += '</div>' } @@ -78,21 +85,18 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <fieldset class="cbi-section"> <legend><%:Overview of currently active OLSR host net announcements%></legend> - <div class="table cbi-section-table"> - <div class="thead"> + <div class="table cbi-section-table" id="olsrd_hna"> <div class="tr cbi-section-table-titles"> <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"><%:Validity Time%></div> </div> - </div> - <div class="tbody" id="olsrd_hna"> <% for k, route in ipairs(hna) do %> <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=hna[k].proto%>"> - <div class="td cbi-section-table-cell"><%=hna[k].destination%>/<%=hna[k].genmask%> </div> - <div class="td cbi-section-table-cell"> + <div class="td cbi-section-table-cell left"><%=hna[k].destination%>/<%=hna[k].genmask%> </div> + <div class="td cbi-section-table-cell left"> <% if hna[k].proto == '6' then %> <a href="http://[<%=hna[k].gateway%>]/cgi-bin-status.html"><%=hna[k].gateway%></a> <% else %> @@ -108,12 +112,11 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, validity = '-' end %> - <div class="td cbi-section-table-cell"><%=validity%></div> + <div class="td cbi-section-table-cell left"><%=validity%></div> </div> <% i = ((i % 2) + 1) end %> - </div> </div> </fieldset> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm index e3ccd0c23d..12f7cba967 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/interfaces.htm @@ -21,6 +21,7 @@ local i = 1 <div class="table cbi-section-table"> <div class="tr"> <div class="th cbi-section-table-cell"><%:Interface%></div> + <div class="th cbi-section-table-cell"><%:Device%></div> <div class="th cbi-section-table-cell"><%:State%></div> <div class="th cbi-section-table-cell"><%:MTU%></div> <div class="th cbi-section-table-cell"><%:WLAN%></div> @@ -32,13 +33,14 @@ local i = 1 <% for k, iface in ipairs(iface) do %> <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=iface.proto%>"> - <div class="td cbi-section-table-cell"><%=iface.name%></div> - <div class="td cbi-section-table-cell"><%=iface.state%></div> - <div class="td cbi-section-table-cell"><%=iface.olsrMTU%></div> - <div class="td cbi-section-table-cell"><%=iface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> - <div class="td cbi-section-table-cell"><%=iface.ipv4Address or iface.ipv6Address%></div> - <div class="td cbi-section-table-cell"><%=iface.netmask%></div> - <div class="td cbi-section-table-cell"><%=iface.broadcast or iface.multicast%></div> + <div class="td cbi-section-table-cell left"><%=iface.interface%></div> + <div class="td cbi-section-table-cell left"><%=iface.name%></div> + <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.up and luci.i18n.translate('up') or luci.i18n.translate('down')%></div> + <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.mtu%></div> + <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.wireless and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.ipAddress%></div> + <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.ipv4Address ~= '0.0.0.0' and iface.olsrInterface.ipv4Netmask%></div> + <div class="td cbi-section-table-cell left"><%=iface.olsrInterface.ipv4Address ~= '0.0.0.0' and iface.olsrInterface.ipv4Broadcast or iface.olsrInterface.ipv6Multicast%></div> </div> <% i = ((i % 2) + 1) end %> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm index 8c9f63af0b..469d89111a 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/mid.htm @@ -31,15 +31,15 @@ local i = 1 end aliases = v.ipAddress .. sep .. aliases end - local host = mid.ipAddress + local host = mid.main.ipAddress if mid.proto == '6' then - host = '[' .. mid.ipAddress .. ']' + host = '[' .. mid.main.ipAddress .. ']' end %> <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=mid.proto%>"> - <div class="td cbi-section-table-cell"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.ipAddress%></a></div> - <div class="td cbi-section-table-cell"><%=aliases%></div> + <div class="td cbi-section-table-cell left"><a href="http://<%=host%>/cgi-bin-status.html"><%=mid.main.ipAddress%></a></div> + <div class="td cbi-section-table-cell left"><%=aliases%></div> </div> <% i = ((i % 2) + 1) diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm index 29ea95694c..8cdda14916 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/neighbors.htm @@ -56,7 +56,17 @@ end var nt = document.getElementById('olsr_neigh_table'); if (nt) { - var s = ''; + var s = '<div class="tr cbi-section-table-cell">' + + '<div class="th cbi-section-table-cell"><%:Neighbour IP%></div>' + + '<div class="th cbi-section-table-cell"><%:Hostname%></div>' + + '<div class="th cbi-section-table-cell"><%:Interface%></div>' + + '<div class="th cbi-section-table-cell"><%:Local interface IP%></div>' + + '<div class="th cbi-section-table-cell">LQ</div>' + + '<div class="th cbi-section-table-cell">NLQ</div>' + + '<div class="th cbi-section-table-cell">ETX</div>' + + '<div class="th cbi-section-table-cell">SNR</div>' + + '</div>'; + for (var idx = 0; idx < info.length; idx++) { var neigh = info[idx]; @@ -64,34 +74,34 @@ end if (neigh.proto == '6') { s += String.format( '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + - '<div class="td cbi-section-table-titles" style="background-color:%s"><a href="http://[%s]/cgi-bin-status.html">%s</a></div>', + '<div class="td cbi-section-table-cell left" style="background-color:%s"><a href="http://[%s]/cgi-bin-status.html">%s</a></div>', neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip ); } else { s += String.format( '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + - '<div class="td cbi-section-table-titles" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></div>', + '<div class="td cbi-section-table-cell left" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></div>', neigh.proto, neigh.dfgcolor, neigh.rip, neigh.rip ); } if (neigh.hn) { s += String.format( - '<div class="td cbi-section-table-titles" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></div>', + '<div class="td cbi-section-table-cell left" style="background-color:%s"><a href="http://%s/cgi-bin-status.html">%s</a></div>', neigh.dfgcolor, neigh.hn, neigh.hn ); } else { s += String.format( - '<div class="td cbi-section-table-titles" style="background-color:%s">?</div>', + '<div class="td cbi-section-table-cell left" style="background-color:%s">?</div>', neigh.dfgcolor ); } s += String.format( - '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + - '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + - '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + - '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + - '<div class="td cbi-section-table-titles" style="background-color:%s">%s</div>' + - '<div class="td cbi-section-table-titles" style="background-color:%s" title="Signal: %s Noise: %s">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s" title="Signal: %s Noise: %s">%s</div>' + '</div>', neigh.dfgcolor, neigh.ifn, neigh.dfgcolor, neigh.lip, neigh.dfgcolor, neigh.lq, neigh.dfgcolor, neigh.nlq, neigh.color, neigh.cost, neigh.snr_color, neigh.signal, neigh.noise, neigh.snr || '?' ); @@ -111,9 +121,8 @@ end <fieldset class="cbi-section"> <legend><%:Overview of currently established OLSR connections%></legend> - <div class="table cbi-section-table"> - <div class="thead"> - <div class="tr cbi-section-table-titles"> + <div class="table cbi-section-table" id="olsr_neigh_table"> + <div class="tr cbi-section-table-cell"> <div class="th cbi-section-table-cell"><%:Neighbour IP%></div> <div class="th cbi-section-table-cell"><%:Hostname%></div> <div class="th cbi-section-table-cell"><%:Interface%></div> @@ -123,9 +132,7 @@ end <div class="th cbi-section-table-cell">ETX</div> <div class="th cbi-section-table-cell">SNR</div> </div> - </div> - <div class="tbody" id="olsr_neigh_table"> <% local i = 1 for k, link in ipairs(links) do link.linkCost = tonumber(link.linkCost) or 0 @@ -148,22 +155,21 @@ end <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=link.proto%>"> <% if link.proto == "6" then %> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://[<%=link.remoteIP%>]/cgi-bin-status.html"><%=link.remoteIP%></a></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><a href="http://[<%=link.remoteIP%>]/cgi-bin-status.html"><%=link.remoteIP%></a></div> <% else %> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.remoteIP%>/cgi-bin-status.html"><%=link.remoteIP%></a></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.remoteIP%>/cgi-bin-status.html"><%=link.remoteIP%></a></div> <% end %> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.hostname%>/cgi-bin-status.html"><%=link.hostname%></a></div> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=link.interface%></div> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=link.localIP%></div> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.linkQuality)%></div> - <div class="td cbi-section-table-titles" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.neighborLinkQuality)%></div> - <div class="td cbi-section-table-titles" style="background-color:<%=color%>"><%=string.format("%.3f", link.linkCost)%></div> - <div class="td cbi-section-table-titles" style="background-color:<%=snr_color%>" title="Signal: <%=link.signal%> Noise: <%=link.noise%>"><%=link.snr%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><a href="http://<%=link.hostname%>/cgi-bin-status.html"><%=link.hostname%></a></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><%=link.interface%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><%=link.localIP%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.linkQuality)%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=defaultgw_color%>"><%=string.format("%.3f", link.neighborLinkQuality)%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=color%>"><%=string.format("%.3f", link.linkCost)%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=snr_color%>" title="Signal: <%=link.signal%> Noise: <%=link.noise%>"><%=link.snr%></div> </div> <% i = ((i % 2) + 1) end %> - </div> </div> <br /> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm index f205edc16d..7bfd73df20 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/overview.htm @@ -61,12 +61,12 @@ XHR.poll(10, '<%=REQUEST_URI%>/json', { }, if (e = document.getElementById('version')) var version; var date; - if (info.v4.config.olsrdVersion != undefined) { - version = info.v4.config.olsrdVersion - date = info.v4.config.olsrdBuildDate - } else if (info.v6.config.olsrdVersion != undefined) { - version = info.v6.config.olsrdVersion - date = info.v6.config.olsrdBuildDate + if (info.v4.version.version != undefined) { + version = info.v4.version.version + date = info.v4.version.date + } else if (info.v6.version.version != undefined) { + version = info.v6.version.version + date = info.v6.version.date } else { version = 'unknown' date = 'unknown' 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 4b733524a5..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,21 +43,28 @@ 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]; s += String.format( '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-%s">' + - '<div class="td cbi-section-table-cell">%s/%s</div>' + - '<div class="td cbi-section-table-cell">' + + '<div class="td cbi-section-table-cell left">%s/%s</div>' + + '<div class="td cbi-section-table-cell left">' + '<a href="http://%s/cgi-bin-status.html">%s</a>', route.proto, route.dest, route.genmask, route.gw, route.gw ) 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 || '?' @@ -72,9 +79,9 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, } s += String.format( '</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell" style="background-color:%s">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left" style="background-color:%s">%s</div>' + '</div>', route.interface, route.metric, route.color, route.etx || '?' ); @@ -95,27 +102,23 @@ 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="thead"> - <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> <div class="th cbi-section-table-cell"><%:Metric%></div> <div class="th cbi-section-table-cell">ETX</div> </div> - </div> - - <div class="tbody" id="olsrd_routes"> <% for k, route in ipairs(routes) do - ETX = tonumber(route.rtpMetricCost)/1024 or '0' + ETX = tonumber(route.etx) or '0' color = olsrtools.etx_color(ETX) %> <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=route.proto%>"> - <div class="td cbi-section-table-cell"><%=route.destination%>/<%=route.genmask%></div> - <div class="td cbi-section-table-cell"> + <div class="td cbi-section-table-cell left"><%=route.destination%>/<%=route.genmask%></div> + <div class="td cbi-section-table-cell left"> <% if route.proto == '6' then %> <a href="http://[<%=route.gateway%>]/cgi-bin-status.html"><%=route.gateway%></a> <% else %> @@ -125,14 +128,13 @@ XHR.poll(20, '<%=REQUEST_URI%>', { status: 1 }, / <a href="http://<%=route.Hostname%>/cgi-bin-status.html"><%=route.hostname%></a> <% end %> </div> - <div class="td cbi-section-table-cell"><%=route.networkInterface%></div> - <div class="td cbi-section-table-cell"><%=route.metric%></div> - <div class="td cbi-section-table-cell" style="background-color:<%=color%>"><%=string.format("%.3f", ETX)%></div> + <div class="td cbi-section-table-cell left"><%=route.networkInterface%></div> + <div class="td cbi-section-table-cell left"><%=route.metric%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=color%>"><%=string.format("%.3f", ETX)%></div> </div> <% i = ((i % 2) + 1) end %> - </div> </div> <%+status-olsr/legend%> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm index 9afd367d1f..8cd2088e42 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/smartgw.htm @@ -17,23 +17,23 @@ end) if luci.http.formvalue("status") == "1" then local rv = {} - for k, gw in ipairs(gws) do - gw.tcPathCost = tonumber(gw.tcPathCost)/1024 or 0 - if gw.tcPathCost == 4096 then - gw.tcPathCost = 0 + for k, gw in ipairs(gws.ipv4, gws.ipv6) do + gw.cost = tonumber(gw.cost)/1024 or 0 + if gw.cost >= 100 then + gw.cost = 0 end rv[#rv+1] = { - proto = gw.proto, - ipAddress = gw.ipAddress, - status = gw.ipv4Status or gw.ipv6Status, - tcPathCost = string.format("%.3f", gw.tcPathCost), - hopCount = gw.hopCount, - uplinkSpeed = gw.uplinkSpeed, - downlinkSpeed = gw.downlinkSpeed, - v4 = gw.ipv4 and luci.i18n.translate('yes') or luci.i18n.translate('no'), - v6 = gw.ipv6 and luci.i18n.translate('yes') or luci.i18n.translate('no'), - externalPrefix = gw.externalPrefix + proto = gw.IPv4 and '4' or '6', + originator = gw.originator, + selected = gw.selected and luci.i18n.translate('yes') or luci.i18n.translate('no'), + cost = gw.cost > 0 and string.format("%.3f", gw.cost) or luci.i18n.translate('infinate'), + hops = gw.hops, + uplink = gw.uplink, + downlink = gw.downlink, + v4 = gw.IPv4 and luci.i18n.translate('yes') or luci.i18n.translate('no'), + v6 = gw.IPv6 and luci.i18n.translate('yes') or luci.i18n.translate('no'), + prefix = gw.prefix } end luci.http.prepare_content("application/json") @@ -51,28 +51,40 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, var smartgwdiv = document.getElementById('olsrd_smartgw'); if (smartgwdiv) { - var s = ''; + var s = '<div class="tr cbi-section-table-titles">' + + '<div class="th cbi-section-table-cell"><%:Gateway%></div>' + + '<div class="th cbi-section-table-cell"><%:Selected%></div>' + + '<div class="th cbi-section-table-cell"><%:ETX%></div>' + + '<div class="th cbi-section-table-cell"><%:Hops%></div>' + + '<div class="th cbi-section-table-cell"><%:Uplink%></div>' + + '<div class="th cbi-section-table-cell"><%:Downlink%></div>' + + '<div class="th cbi-section-table-cell"><%:IPv4%></div>' + + '<div class="th cbi-section-table-cell"><%:IPv6%></div>' + + '<div class="th cbi-section-table-cell"><%:Prefix%></div>' + + '</div>'; + for (var idx = 0; idx < info.length; idx++) { var smartgw = info[idx]; + var linkgw; s += '<div class="tr cbi-section-table-row cbi-rowstyle-'+(1 + (idx % 2))+' proto-' + smartgw.proto + '">' if (smartgw.proto == '6') { - linkgw = '<a href="http://[' + smartgw.ipAddress + ']/cgi-bin-status.html">' + smartgw.ipAddress + '</a>' + linkgw = '<a href="http://[' + smartgw.originator + ']/cgi-bin-status.html">' + smartgw.originator + '</a>' } else { - linkgw = '<a href="http://' + smartgw.ipAddress + '/cgi-bin-status.html">' + smartgw.ipAddress + '</a>' + linkgw = '<a href="http://' + smartgw.originator + '/cgi-bin-status.html">' + smartgw.originator + '</a>' } s += String.format( - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>' + - '<div class="td cbi-section-table-cell">%s</div>', - linkgw, smartgw.status, smartgw.tcPathCost, smartgw.hopCount, smartgw.uplinkSpeed, smartgw.downlinkSpeed, smartgw.v4, smartgw.v6, smartgw.externalPrefix + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>' + + '<div class="td cbi-section-table-cell left">%s</div>', + linkgw, smartgw.selected, smartgw.cost, smartgw.hops, smartgw.uplink, smartgw.downlink, smartgw.v4, smartgw.v6, smartgw.prefix ) s += '</div>' } @@ -82,9 +94,6 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, ); //]]></script> - -<%+header%> - <h2 name="content"><%:SmartGW announcements%></h2> <div id="togglebuttons"></div> @@ -93,11 +102,10 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <fieldset class="cbi-section"> <legend><%:Overview of smart gateways in this network%></legend> - <div class="table cbi-section-table"> - <div class="thead"> + <div class="table cbi-section-table" id="olsrd_smartgw"> <div class="tr cbi-section-table-titles"> <div class="th cbi-section-table-cell"><%:Gateway%></div> - <div class="th cbi-section-table-cell"><%:Status%></div> + <div class="th cbi-section-table-cell"><%:Selected%></div> <div class="th cbi-section-table-cell"><%:ETX%></div> <div class="th cbi-section-table-cell"><%:Hops%></div> <div class="th cbi-section-table-cell"><%:Uplink%></div> @@ -105,39 +113,35 @@ XHR.poll(10, '<%=REQUEST_URI%>', { status: 1 }, <div class="th cbi-section-table-cell"><%:IPv4%></div> <div class="th cbi-section-table-cell"><%:IPv6%></div> <div class="th cbi-section-table-cell"><%:Prefix%></div> - - </div> </div> - <div class="tbody" id="olsrd_smartgw"> - <% for k, gw in ipairs(gws) do + <% for k, gw in ipairs(gws.ipv4, gws.ipv6) do - gw.tcPathCost = tonumber(gw.tcPathCost)/1024 or 0 - if gw.tcPathCost == 4096 then - gw.tcPathCost = 0 + gw.cost = tonumber(gw.cost)/1024 or 0 + if gw.cost >= 100 then + gw.cost = 0 end %> <div class="tr cbi-section-table-row cbi-rowstyle-<%=i%> proto-<%=proto%>"> <% if gw.proto == '6' then %> - <div class="td cbi-section-table-cell"><a href="http://[<%=gw.ipAddress%>]/cgi-bin-status.html"><%=gw.ipAddress%></a></div> + <div class="td cbi-section-table-cell left"><a href="http://[<%=gw.originator%>]/cgi-bin-status.html"><%=gw.originator%></a></div> <% else %> - <div class="td cbi-section-table-cell"><a href="http://<%=gw.ipAddress%>/cgi-bin-status.html"><%=gw.ipAddress%></a></div> + <div class="td cbi-section-table-cell left"><a href="http://<%=gw.originator%>/cgi-bin-status.html"><%=gw.originator%></a></div> <% end %> - <div class="td cbi-section-table-cell"><%=gw.ipv4Status or gw.ipv6Status or '-' %></div> - <div class="td cbi-section-table-cell"><%=string.format("%.3f", gw.tcPathCost)%></div> - <div class="td cbi-section-table-cell"><%=gw.hopCount%></div> - <div class="td cbi-section-table-cell"><%=gw.uplinkSpeed%></div> - <div class="td cbi-section-table-cell"><%=gw.downlinkSpeed%></div> - <div class="td cbi-section-table-cell"><%=gw.ipv4 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> - <div class="td cbi-section-table-cell"><%=gw.ipv6 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> - <div class="td cbi-section-table-cell"><%=gw.externalPrefix%></div> + <div class="td cbi-section-table-cell left"><%=gw.selected and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell left"><%=gw.cost > 0 and string.format("%.3f", gw.cost) or luci.i18n.translate('infinate')%></div> + <div class="td cbi-section-table-cell left"><%=gw.hops%></div> + <div class="td cbi-section-table-cell left"><%=gw.uplink%></div> + <div class="td cbi-section-table-cell left"><%=gw.downlink%></div> + <div class="td cbi-section-table-cell left"><%=gw.IPv4 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell left"><%=gw.IPv6 and luci.i18n.translate('yes') or luci.i18n.translate('no')%></div> + <div class="td cbi-section-table-cell left"><%=gw.prefix%></div> </div> <% i = ((i % 2) + 1) end %> - </div> </div> </fieldset> diff --git a/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm b/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm index 02fdfddac3..fe673c4111 100644 --- a/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm +++ b/applications/luci-app-olsr/luasrc/view/status-olsr/topology.htm @@ -27,7 +27,7 @@ local olsrtools = require "luci.tools.olsr" </div> <% for k, route in ipairs(routes) do - local cost = string.format("%.3f", tonumber(route.tcEdgeCost/1024) or 0) + local cost = string.format("%.3f", tonumber(route.tcEdgeCost) or 0) local color = olsrtools.etx_color(tonumber(cost)) local lq = string.format("%.3f", tonumber(route.linkQuality) or 0) local nlq = string.format("%.3f", tonumber(route.neighborLinkQuality) or 0) @@ -37,19 +37,19 @@ local olsrtools = require "luci.tools.olsr" <% if route.proto == "6" then %> - <div class="td cbi-section-table-cell"><a href="http://[<%=route.destinationIP%>]/cgi-bin-status.html"><%=route.destinationIP%></a></div> - <div class="td cbi-section-table-cell"><a href="http://[<%=route.lastHopIP%>]/cgi-bin-status.html"><%=route.lastHopIP%></a></div> + <div class="td cbi-section-table-cell left"><a href="http://[<%=route.destinationIP%>]/cgi-bin-status.html"><%=route.destinationIP%></a></div> + <div class="td cbi-section-table-cell left"><a href="http://[<%=route.lastHopIP%>]/cgi-bin-status.html"><%=route.lastHopIP%></a></div> <% else %> - <div class="td cbi-section-table-cell"><a href="http://<%=route.destinationIP%>/cgi-bin-status.html"><%=route.destinationIP%></a></div> - <div class="td cbi-section-table-cell"><a href="http://<%=route.lastHopIP%>/cgi-bin-status.html"><%=route.lastHopIP%></a></div> + <div class="td cbi-section-table-cell left"><a href="http://<%=route.destinationIP%>/cgi-bin-status.html"><%=route.destinationIP%></a></div> + <div class="td cbi-section-table-cell left"><a href="http://<%=route.lastHopIP%>/cgi-bin-status.html"><%=route.lastHopIP%></a></div> <%end%> - <div class="td cbi-section-table-cell"><%=lq%></div> - <div class="td cbi-section-table-cell"><%=nlq%></div> - <div class="td cbi-section-table-cell" style="background-color:<%=color%>"><%=cost%></div> + <div class="td cbi-section-table-cell left"><%=lq%></div> + <div class="td cbi-section-table-cell left"><%=nlq%></div> + <div class="td cbi-section-table-cell left" style="background-color:<%=color%>"><%=cost%></div> </div> <% i = ((i % 2) + 1) |