Browse Source

Move the graphs to the DNS and logs area, coz the graphs are per IP.

master
onefang 3 years ago
parent
commit
227f20f5ca
  1. 15
      apt-panopticon-report-email-web.lua

15
apt-panopticon-report-email-web.lua

@ -215,7 +215,7 @@ local makeTable = function(web, hosts)
"<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('Redirects') ..
"</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" ..
"<th colspan='2'>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" ..
"<th colspan='2'>" .. lnk('Weekly statistics', 'Weekly') .. "</th><th>" .. lnk('Graphs') .. "</th></tr>\n")
"<th colspan='2'>" .. lnk('Weekly statistics', 'Weekly') .. "</th></tr>\n")
local bg = ''
for k, v in APT.orderedPairs(hosts) do
if '' == bg then bg = " style='background-color:#111111'" else bg = '' end
@ -242,7 +242,6 @@ local makeTable = function(web, hosts)
local max = tonumber(results.speed.max)
local spd = '<td></td><td></td>'
local week = '<td>&nbsp;</td><td>&nbsp;</td>'
local graph = '<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>'
if nil == rate then rate = '' end
-- DNS-RR test.
@ -298,7 +297,7 @@ local makeTable = function(web, hosts)
web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns ..
"&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. redirects .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td>" .. '<td>' .. rate ..
'</td><td>' .. updated .. '</td>&nbsp;' .. spd .. "&nbsp;" .. week .."&nbsp;<td>" .. graph .. "</td></tr>\n")
'</td><td>' .. updated .. '</td>&nbsp;' .. spd .. "&nbsp;" .. week .."&nbsp;</tr>\n")
if "" ~= active then
web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n")
end
@ -324,15 +323,15 @@ local makeIPlist = function(hosts)
if type(w) == "table" then
n[l] = {}
for i, u in pairs(w) do
local log = logCount(k, i)
local log = '[<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '_' .. i .. '">graphs</a>] &nbsp; ' .. logCount(k, i)
if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end
end
else
local log = logCount(k, l)
local log = '[<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '_' .. l .. '">graphs</a>] &nbsp; ' .. logCount(k, l)
if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end
end
end
m[log .. " DNS entries -" .. redirs(hosts, k)] = n
m['[<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>] &nbsp; ' .. log .. " DNS entries -" .. redirs(hosts, k)] = n
end
return m
end
@ -496,7 +495,7 @@ if nil == web then C("opening mirrors file - " .. e) else
makeTable(web, APT.mirrors)
web:write( "<h2>==== faulty mirrors: ====</h2>\n" .. faulty)
web:write( "<br>\n<br>\n<h2>==== DNS and logs: ====</h2>\n")
web:write( "<br>\n<br>\n<h2>==== DNS, graphs <a href='explanations.html#Graphs'>*</a>, and logs: ====</h2>\n")
m = makeIPlist(APT.mirrors)
web:write( "<p>This lists each mirror, and the DNS entries for that mirror. &nbsp; " ..
@ -521,7 +520,7 @@ if nil == web then C("opening mirrors file - " .. e) else
)
makeTable(web, APT.debians)
web:write( "<br>\n<br>\n<h2>==== Debian DNS and logs: ====</h2>\n")
web:write( "<br>\n<br>\n<h2>==== Debian DNS, graphs <a href='explanations.html#Graphs'>*</a>, and logs: ====</h2>\n")
m = makeIPlist(APT.debians)
web:write(APT.dumpTableHTML(m, ""))

Loading…
Cancel
Save