aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticon-report-email-web.lua
diff options
context:
space:
mode:
authoronefang2019-12-30 17:05:18 +1000
committeronefang2019-12-30 17:05:18 +1000
commitf02b222005f7d656a6da8d25dca5a5fef56857c2 (patch)
treed8746d182a6b11fd590d94199c31312d369c2996 /apt-panopticon-report-email-web.lua
parentTODO++ (diff)
downloadapt-panopticon-f02b222005f7d656a6da8d25dca5a5fef56857c2.zip
apt-panopticon-f02b222005f7d656a6da8d25dca5a5fef56857c2.tar.gz
apt-panopticon-f02b222005f7d656a6da8d25dca5a5fef56857c2.tar.bz2
apt-panopticon-f02b222005f7d656a6da8d25dca5a5fef56857c2.tar.xz
A lot of tweaking of the logging and reporting, making it easier to read.
Diffstat (limited to 'apt-panopticon-report-email-web.lua')
-rwxr-xr-xapt-panopticon-report-email-web.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index 97f7cef..05699ee 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -213,7 +213,7 @@ end
213local makeTable = function(web, hosts) 213local makeTable = function(web, hosts)
214 web:write("<table>\n<tr><th></th><th>" .. lnk('FTP') .. "</th><th>" .. lnk('HTTP') .. "</th><th>" .. lnk('HTTPS') .. "</th><th>" .. lnk('RSYNC') .. "</th>" .. 214 web:write("<table>\n<tr><th></th><th>" .. lnk('FTP') .. "</th><th>" .. lnk('HTTP') .. "</th><th>" .. lnk('HTTPS') .. "</th><th>" .. lnk('RSYNC') .. "</th>" ..
215 "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" .. 215 "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" ..
216 "<th>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" .. 216 "<th colspan='2'>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" ..
217 "<th colspan='2'>" .. lnk('Weekly statistics', 'Weekly') .. "</th><th>" .. lnk('Graphs') .. "</th></tr>\n") 217 "<th colspan='2'>" .. lnk('Weekly statistics', 'Weekly') .. "</th><th>" .. lnk('Graphs') .. "</th></tr>\n")
218 local bg = '' 218 local bg = ''
219 for k, v in APT.orderedPairs(hosts) do 219 for k, v in APT.orderedPairs(hosts) do
@@ -235,13 +235,13 @@ local makeTable = function(web, hosts)
235 local sanity = status(hosts, k, results, "URLSanity") 235 local sanity = status(hosts, k, results, "URLSanity")
236 local integrity = status(hosts, k, results, "Integrity") 236 local integrity = status(hosts, k, results, "Integrity")
237 local updated = status(hosts, k, results, "Updated") 237 local updated = status(hosts, k, results, "Updated")
238 local rate = v.Rate 238 local rate = v.Rate
239 if nil ~= rate then updated = updated .. ' ' .. rate end
240 local min = tonumber(results.speed.min) 239 local min = tonumber(results.speed.min)
241 local max = tonumber(results.speed.max) 240 local max = tonumber(results.speed.max)
242 local spd = '<td></td><td></td>' 241 local spd = '<td></td><td></td>'
243 local week = '<td></td><td></td>' 242 local week = '<td>&nbsp;</td><td>&nbsp;</td>'
244 local graph = '<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>' 243 local graph = '<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>'
244 if nil == rate then rate = '' end
245 245
246 -- DNS-RR test. 246 -- DNS-RR test.
247 if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) then 247 if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) then
@@ -291,12 +291,12 @@ local makeTable = function(web, hosts)
291 if '0.00' == percentUp then percentUpdated = '??' end -- We are counting errors, and you can't get an error if you can't check anything. 291 if '0.00' == percentUp then percentUpdated = '??' end -- We are counting errors, and you can't get an error if you can't check anything.
292 -- TODO - try to account for this better, this is just a quick hack. 292 -- TODO - try to account for this better, this is just a quick hack.
293 end 293 end
294 week = '<td>' .. percentUp .. '% up</td><td>' .. percentUpdated .. '% updated</td>' 294 week = '<td>&nbsp;' .. percentUp .. '% up</td><td>&nbsp;' .. percentUpdated .. '% updated</td>'
295 end 295 end
296 296
297 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns .. 297 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns ..
298 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td><td>" .. updated .. 298 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td>" .. '<td>' .. rate ..
299 "&nbsp;" .. spd .. "&nbsp;" .. week .."&nbsp;<td>" .. graph .. "</td></tr>\n") 299 '</td><td>' .. updated .. '</td>&nbsp;' .. spd .. "&nbsp;" .. week .."&nbsp;<td>" .. graph .. "</td></tr>\n")
300 if "" ~= active then 300 if "" ~= active then
301 web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n") 301 web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n")
302 end 302 end
@@ -482,7 +482,7 @@ if nil == web then C("opening mirrors file - " .. e) else
482 " means the mirror had some timeouts, and tests where not yet aborted. The darker colour means unsupported by the mirror, but tested anyway.</p>" .. 482 " means the mirror had some timeouts, and tests where not yet aborted. The darker colour means unsupported by the mirror, but tested anyway.</p>" ..
483 "<p><font color='blue'><b>TIMEOUT</b></font> or <font color='darkblue'><b>TIMEOUT</b></font>" .. 483 "<p><font color='blue'><b>TIMEOUT</b></font> or <font color='darkblue'><b>TIMEOUT</b></font>" ..
484 " means the mirror had too many timeouts, and tests where aborted, so there is no result for this test.</p>" .. 484 " means the mirror had too many timeouts, and tests where aborted, so there is no result for this test.</p>" ..
485 "<p>NOTE: timeouts may be due to a problem on the testing computer.</p>" .. 485 "<p>NOTE: timeouts may be due to a problem on the testing computer, it might be busy with other things, or be having it's own network problems..</p>" ..
486 "<p>The DNS round robin (DNS-RR) column shows the IPs for that mirror, or <font color='grey'><b>no</b></font> if it isn't part of the DNS-RR. &nbsp; " .. 486 "<p>The DNS round robin (DNS-RR) column shows the IPs for that mirror, or <font color='grey'><b>no</b></font> if it isn't part of the DNS-RR. &nbsp; " ..
487 "The IPs link to the testing log for that IP accessed via the DNS-RR. &nbsp; " .. 487 "The IPs link to the testing log for that IP accessed via the DNS-RR. &nbsp; " ..
488 APT.options.roundRobin.value .. " is the DNS-RR itself, so it doesn't get tested directly.</p>\n" .. 488 APT.options.roundRobin.value .. " is the DNS-RR itself, so it doesn't get tested directly.</p>\n" ..
@@ -497,7 +497,7 @@ if nil == web then C("opening mirrors file - " .. e) else
497 497
498 m = makeIPlist(APT.mirrors) 498 m = makeIPlist(APT.mirrors)
499 web:write( "<p>This lists each mirror, and the DNS entries for that mirror. &nbsp; " .. 499 web:write( "<p>This lists each mirror, and the DNS entries for that mirror. &nbsp; " ..
500 "The links point to the testing log files for " .. logCount("apt-panopticon") .. " for each domain name / IP combination that was tested. &nbsp; " .. 500 "The links point to the testing log files (" .. logCount("apt-panopticon") .. ") for each domain name / IP combination that was tested. &nbsp; " ..
501 "If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. &nbsp; " .. 501 "If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. &nbsp; " ..
502 APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. &nbsp; " .. 502 APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. &nbsp; " ..
503 "If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>' &nbsp; " .. 503 "If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>' &nbsp; " ..