diff --git a/files/www/cgi-bin/mesh b/files/www/cgi-bin/mesh index c0217065..618d5df4 100755 --- a/files/www/cgi-bin/mesh +++ b/files/www/cgi-bin/mesh @@ -512,6 +512,7 @@ if not next(localhosts) and not next(links) then end -- show local node table + html.print("
") @@ -523,24 +524,37 @@ if next(localhosts) then local rows = {} for ip, host in pairs(localhosts) do + local c1, c2, c3 local localpart = host.name:match("([^.]*)%.") if localpart then local tactical = "" if host.tactical ~= "" then tactical = " / " .. host.tactical end - local row = " | ||
---|---|---|
" .. localpart .. tactical + c1 = localpart .. tactical if wangateway[ip] then - row = row .. " (wan)" + c1 = c1 .. " (wan)" end - row = row .. " | "
+ c2 = " " if services[host.name] then - for n, v in pairs(services[host.name]) + local i=1 + for _, v in pairs(services[host.name]) do - row = row .. v .. " " + if c3 then + c3 = c3 .. v .. " " + else + c3 = v .. " " + end + if i > 1 then c2 = c2 .. " " end + i=i+1 + end + else + if c3 then + c3 = c3 .. " " + else + c3 = " " end end - row = row .. " | |
" .. localpart .. " | " + c2 = c2 .. localpart .. "||
" .. localpart .. " | " + c2 = c2 .. "" .. localpart .. "||
" .. localpart .." | " + c2 = c2 .. "" .. localpart .. ""
+ local i=1
for n, v in pairs(services[dmzhost])
do
- row = row .. v .. " " + if c3 then + c3 = c3 .. v .. " " + else + c3 = v .. " " + end + if i > 1 then c2 = c2 .. " " end + i=i+1 end end - row = row .. " | |
" .. c1 .. " | " .. c2 .. " | " .. c3 .. " |
") html.print(" | ") html.print(" | LQ | NLQ | TxMbps | ") ---html.print("Service Name | ") html.print("") html.print(" |
---|---|---|---|---|---|---|
" .. localpart .. tactical .. "" + c1 = "" .. localpart .. tactical .. "" local nodeiface if ipmain ~= ip then if links[ip].dtd then @@ -656,20 +677,35 @@ do end end if nodeiface then - row = row .. " (" .. nodeiface .. ")" + c1 = c1 .. " (" .. nodeiface .. ")" end - row = row .. string.format(" | %.0f%% | %.0f%% | %s | ", 100 * link.lq, 100 * link.nlq, link.mbps) + c2 = ""
if services[name] then
+ local i=1
for _, v in pairs(services[name])
do
- row = row .. v .. " " + if c6 then + c6 = c6 .. v .. " " + else + c6 = v .. " " + end + if i > 1 then c2 = c2 .. " " end + i=i+1 + end + else + if c6 then + c6 = c6 .. " " + else + c6 = " " end end - row = row .. " | ||
" .. localpart .. " | " - row = row .. ""
+ c2 = c2 .. localpart .. " " if services[dmzhost] then + local i=1 for _, v in pairs(services[dmzhost]) do - row = row .. v .. " " + if c6 then + c6 = c6 .. v .. " " + else + c6 = v .. " " + end + if i > 1 then c2 = c2 .. " " end + i=i+1 + end + else + if c6 then + c6 = c6 .. " " + else + c6 = " " end end - row = row .. " | |||||
" .. c1 .. " | " .. c2 .. " | " .. c3 .. " | " .. c4 .. " | " .. c5 .. " | " .. c6 .. " | |
Previous Neighbors | ||||||
Previous Neighbors |
") html.print(" | ") @@ -767,10 +815,10 @@ html.print(" | ETX | ") html.print("") html.print(" |
---|---|---|---|
" .. localpart .. tactical .. "" + c1 = "" .. localpart .. tactical .. "" local nodeiface local mycount = 0 if midcount[ip] then @@ -802,33 +850,61 @@ do end end if nodeiface then - row = row .. " (" .. nodeiface .. ")" + c1 = c1 .. " (" .. nodeiface .. ")" end - row = row .. " | " .. etx .. " | "
+ c2 = " " + c3 = string.format("%s", etx) + + -- print node services if any if services[host.name] then + local i=1 for _, v in pairs(services[host.name]) do - row = row .. v .. " " + if c4 then + c4 = c4 .. v .. " " + else + c4 = v .. " " + end + if i > 1 then c2 = c2 .. " " end + i=i+1 + end + else + if c4 then + c4 = c4 .. " " + else + c4 = " " end end - row = row .. " | |
" .. localpart .. " | "
+ c2 = c2 .. localpart .. " " if services[dmzhost] then + local i=1 for _, v in pairs(services[dmzhost]) do - row = row .. v .. " " + if c4 then + c4 = c4 .. v .. " " + else + c4 = v .. " " + end + if i > 1 then c2 = c2 .. " " end + i=i+1 + end + else + if c4 then + c4 = c4 .. " " + else + c4 = " " end end - row = row .. " | ||
" .. c1 .. " | " .. c2 .. " | " .. c3 .. " | " .. c4 .. " |