diff options
author | onefang | 2019-12-31 16:44:00 +1000 |
---|---|---|
committer | onefang | 2019-12-31 16:44:00 +1000 |
commit | 227f20f5cab3f590861e46df549e1007d7925fba (patch) | |
tree | fa46c9e505cff5c7b3fd22f515f32f8cef87edae | |
parent | Add Redirects tests fully. (diff) | |
download | apt-panopticon-227f20f5cab3f590861e46df549e1007d7925fba.zip apt-panopticon-227f20f5cab3f590861e46df549e1007d7925fba.tar.gz apt-panopticon-227f20f5cab3f590861e46df549e1007d7925fba.tar.bz2 apt-panopticon-227f20f5cab3f590861e46df549e1007d7925fba.tar.xz |
Move the graphs to the DNS and logs area, coz the graphs are per IP.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 15 |
1 files 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) | |||
215 | "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('Redirects') .. | 215 | "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('Redirects') .. |
216 | "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" .. | 216 | "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" .. |
217 | "<th colspan='2'>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" .. | 217 | "<th colspan='2'>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" .. |
218 | "<th colspan='2'>" .. lnk('Weekly statistics', 'Weekly') .. "</th><th>" .. lnk('Graphs') .. "</th></tr>\n") | 218 | "<th colspan='2'>" .. lnk('Weekly statistics', 'Weekly') .. "</th></tr>\n") |
219 | local bg = '' | 219 | local bg = '' |
220 | for k, v in APT.orderedPairs(hosts) do | 220 | for k, v in APT.orderedPairs(hosts) do |
221 | if '' == bg then bg = " style='background-color:#111111'" else bg = '' end | 221 | if '' == bg then bg = " style='background-color:#111111'" else bg = '' end |
@@ -242,7 +242,6 @@ local makeTable = function(web, hosts) | |||
242 | local max = tonumber(results.speed.max) | 242 | local max = tonumber(results.speed.max) |
243 | local spd = '<td></td><td></td>' | 243 | local spd = '<td></td><td></td>' |
244 | local week = '<td> </td><td> </td>' | 244 | local week = '<td> </td><td> </td>' |
245 | local graph = '<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>' | ||
246 | if nil == rate then rate = '' end | 245 | if nil == rate then rate = '' end |
247 | 246 | ||
248 | -- DNS-RR test. | 247 | -- DNS-RR test. |
@@ -298,7 +297,7 @@ local makeTable = function(web, hosts) | |||
298 | 297 | ||
299 | web:write("<td>" .. ftp .. " </td><td>" .. http .. " </td><td>" .. https .. " </td><td>" .. rsync .. " </td><td>" .. dns .. | 298 | web:write("<td>" .. ftp .. " </td><td>" .. http .. " </td><td>" .. https .. " </td><td>" .. rsync .. " </td><td>" .. dns .. |
300 | " </td><td>" .. protocol .. " </td><td>" .. redirects .. " </td><td>" .. sanity .. " </td><td>" .. integrity .. " </td>" .. '<td>' .. rate .. | 299 | " </td><td>" .. protocol .. " </td><td>" .. redirects .. " </td><td>" .. sanity .. " </td><td>" .. integrity .. " </td>" .. '<td>' .. rate .. |
301 | '</td><td>' .. updated .. '</td> ' .. spd .. " " .. week .." <td>" .. graph .. "</td></tr>\n") | 300 | '</td><td>' .. updated .. '</td> ' .. spd .. " " .. week .." </tr>\n") |
302 | if "" ~= active then | 301 | if "" ~= active then |
303 | web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n") | 302 | web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n") |
304 | end | 303 | end |
@@ -324,15 +323,15 @@ local makeIPlist = function(hosts) | |||
324 | if type(w) == "table" then | 323 | if type(w) == "table" then |
325 | n[l] = {} | 324 | n[l] = {} |
326 | for i, u in pairs(w) do | 325 | for i, u in pairs(w) do |
327 | local log = logCount(k, i) | 326 | local log = '[<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '_' .. i .. '">graphs</a>] ' .. logCount(k, i) |
328 | if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end | 327 | if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end |
329 | end | 328 | end |
330 | else | 329 | else |
331 | local log = logCount(k, l) | 330 | local log = '[<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '_' .. l .. '">graphs</a>] ' .. logCount(k, l) |
332 | if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end | 331 | if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end |
333 | end | 332 | end |
334 | end | 333 | end |
335 | m[log .. " DNS entries -" .. redirs(hosts, k)] = n | 334 | m['[<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>] ' .. log .. " DNS entries -" .. redirs(hosts, k)] = n |
336 | end | 335 | end |
337 | return m | 336 | return m |
338 | end | 337 | end |
@@ -496,7 +495,7 @@ if nil == web then C("opening mirrors file - " .. e) else | |||
496 | 495 | ||
497 | makeTable(web, APT.mirrors) | 496 | makeTable(web, APT.mirrors) |
498 | web:write( "<h2>==== faulty mirrors: ====</h2>\n" .. faulty) | 497 | web:write( "<h2>==== faulty mirrors: ====</h2>\n" .. faulty) |
499 | web:write( "<br>\n<br>\n<h2>==== DNS and logs: ====</h2>\n") | 498 | web:write( "<br>\n<br>\n<h2>==== DNS, graphs <a href='explanations.html#Graphs'>*</a>, and logs: ====</h2>\n") |
500 | 499 | ||
501 | m = makeIPlist(APT.mirrors) | 500 | m = makeIPlist(APT.mirrors) |
502 | web:write( "<p>This lists each mirror, and the DNS entries for that mirror. " .. | 501 | web:write( "<p>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 | |||
521 | ) | 520 | ) |
522 | 521 | ||
523 | makeTable(web, APT.debians) | 522 | makeTable(web, APT.debians) |
524 | web:write( "<br>\n<br>\n<h2>==== Debian DNS and logs: ====</h2>\n") | 523 | web:write( "<br>\n<br>\n<h2>==== Debian DNS, graphs <a href='explanations.html#Graphs'>*</a>, and logs: ====</h2>\n") |
525 | 524 | ||
526 | m = makeIPlist(APT.debians) | 525 | m = makeIPlist(APT.debians) |
527 | web:write(APT.dumpTableHTML(m, "")) | 526 | web:write(APT.dumpTableHTML(m, "")) |