var tbody = document.getElementById('olsr_services');
if (tbody)
{
- var s = '';
+ var s = '<div class="tr cbi-section-table-titles">' +
+ '<div class="th cbi-section-table-cell"><%:Url%></div>' +
+ '<div class="th cbi-section-table-cell"><%:Protocol%></div>' +
+ '<div class="th cbi-section-table-cell"><%:Source%></div>' +
+ '</div>';
+
for (var idx = 0; idx < info.length; idx++)
{
var service = info[idx];
<fieldset class="cbi-section">
<legend><%:Internal services%></legend>
- <div class="table cbi-section-table">
+ <div class="table cbi-section-table" id="olsr_services">
<div class="tr cbi-section-table-titles">
<div class="th cbi-section-table-cell"><%:Url%></div>
<div class="th cbi-section-table-cell"><%:Protocol%></div>
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];
<fieldset class="cbi-section">
<legend><%:Overview of currently active OLSR host net announcements%></legend>
- <div class="table cbi-section-table">
+ <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>
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];
'<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 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 || '?'
);
<fieldset class="cbi-section">
<legend><%:Overview of currently established OLSR connections%></legend>
- <div class="table cbi-section-table">
+ <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>
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,
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];
)
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 || '?'
<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>
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];
<fieldset class="cbi-section">
<legend><%:Overview of smart gateways in this network%></legend>
- <div class="table cbi-section-table">
+ <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"><%:Selected%></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 k, gw in ipairs(gws.ipv4, gws.ipv6) do