From 227f20f5cab3f590861e46df549e1007d7925fba Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 31 Dec 2019 16:44:00 +1000 Subject: Move the graphs to the DNS and logs area, coz the graphs are per IP. --- apt-panopticon-report-email-web.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 3365d78..27353ad 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -215,7 +215,7 @@ local makeTable = function(web, hosts) "" .. lnk('DNS round robin', 'DNS-RR') .. "" .. lnk('Protocol') .. "" .. lnk('Redirects') .. "" .. lnk('URL sanity', 'URL-Sanity') .. "" .. lnk('Integrity') .. "" .. "" .. lnk('Updated') .. "" .. lnk('Speed range', 'Speed') .. "" .. - "" .. lnk('Weekly statistics', 'Weekly') .. "" .. lnk('Graphs') .. "\n") + "" .. lnk('Weekly statistics', 'Weekly') .. "\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 = '' local week = '  ' - local graph = 'graphs' if nil == rate then rate = '' end -- DNS-RR test. @@ -298,7 +297,7 @@ local makeTable = function(web, hosts) web:write("" .. ftp .. " " .. http .. " " .. https .. " " .. rsync .. " " .. dns .. " " .. protocol .. " " .. redirects .. " " .. sanity .. " " .. integrity .. " " .. '' .. rate .. - '' .. updated .. ' ' .. spd .. " " .. week .." " .. graph .. "\n") + '' .. updated .. ' ' .. spd .. " " .. week .." \n") if "" ~= active then web:write("" .. active .. "\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 = '[graphs]   ' .. 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 = '[graphs]   ' .. 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['[graphs]   ' .. 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( "

==== faulty mirrors: ====

\n" .. faulty) - web:write( "
\n
\n

==== DNS and logs: ====

\n") + web:write( "
\n
\n

==== DNS, graphs *, and logs: ====

\n") m = makeIPlist(APT.mirrors) web:write( "

This lists each mirror, and the DNS entries for that mirror.   " .. @@ -521,7 +520,7 @@ if nil == web then C("opening mirrors file - " .. e) else ) makeTable(web, APT.debians) - web:write( "
\n
\n

==== Debian DNS and logs: ====

\n") + web:write( "
\n
\n

==== Debian DNS, graphs *, and logs: ====

\n") m = makeIPlist(APT.debians) web:write(APT.dumpTableHTML(m, "")) -- cgit v1.1