aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticon-report-email-web.lua
diff options
context:
space:
mode:
authoronefang2019-12-27 13:21:04 +1000
committeronefang2019-12-27 13:21:04 +1000
commit3442d0d038a1e74ff030f21f9dc4d573e1e1c6a6 (patch)
treefe739257a428ef92b683d4d295de441e38004e83 /apt-panopticon-report-email-web.lua
parentMake the web page look better, and the tables take up less space. (diff)
downloadapt-panopticon-3442d0d038a1e74ff030f21f9dc4d573e1e1c6a6.zip
apt-panopticon-3442d0d038a1e74ff030f21f9dc4d573e1e1c6a6.tar.gz
apt-panopticon-3442d0d038a1e74ff030f21f9dc4d573e1e1c6a6.tar.bz2
apt-panopticon-3442d0d038a1e74ff030f21f9dc4d573e1e1c6a6.tar.xz
Add a linky to the graphs for each mirror.
Also includes the place holder for the stil being debugged weekly averages.
Diffstat (limited to 'apt-panopticon-report-email-web.lua')
-rwxr-xr-xapt-panopticon-report-email-web.lua19
1 files changed, 13 insertions, 6 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index 079c4cc..abc376c 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -362,7 +362,8 @@ if nil == web then C("opening mirrors file - " .. e) else
362 "<p><font color='grey'><b>skip</b></font> means that the test hasn't been written yet.</p>\n" .. 362 "<p><font color='grey'><b>skip</b></font> means that the test hasn't been written yet.</p>\n" ..
363 "<table>\n<tr><th></th><th>" .. lnk('FTP') .. "</th><th>" .. lnk('HTTP') .. "</th><th>" .. lnk('HTTPS') .. "</th><th>" .. lnk('RSYNC') .. "</th>" .. 363 "<table>\n<tr><th></th><th>" .. lnk('FTP') .. "</th><th>" .. lnk('HTTP') .. "</th><th>" .. lnk('HTTPS') .. "</th><th>" .. lnk('RSYNC') .. "</th>" ..
364 "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" .. 364 "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" ..
365 "<th>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th></tr>\n" 365 "<th>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" ..
366 "<th colspan='2'>" .. lnk('Weekly averages', 'Weekly') .. "</th><th>" .. lnk('Graphs') .. "</th></tr>\n"
366 ) 367 )
367 368
368 local bg = '' 369 local bg = ''
@@ -390,6 +391,8 @@ if nil == web then C("opening mirrors file - " .. e) else
390 local min = tonumber(results.speed.min) 391 local min = tonumber(results.speed.min)
391 local max = tonumber(results.speed.max) 392 local max = tonumber(results.speed.max)
392 local spd = '<td></td><td></td>' 393 local spd = '<td></td><td></td>'
394 local week = '<td>xxx% up</td><td>xxx% updated</td>'
395 local graph = '<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>'
393 396
394 -- DNS-RR test. 397 -- DNS-RR test.
395 if ("deb.devuan.org" ~= k) and (nil ~= APT.mirrors["deb.devuan.org"]) then 398 if ("deb.devuan.org" ~= k) and (nil ~= APT.mirrors["deb.devuan.org"]) then
@@ -430,8 +433,8 @@ if nil == web then C("opening mirrors file - " .. e) else
430 end 433 end
431 434
432 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns .. 435 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns ..
433 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. sanity .. 436 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td><td>" .. updated ..
434 "&nbsp;</td><td>" .. integrity .. "&nbsp;</td><td>" .. updated .. "&nbsp;</td>" .. spd .. "</tr>\n") 437 "&nbsp;" .. spd .. "&nbsp;" .. week .."&nbsp;<td>" .. graph .. "</td></tr>\n")
435 if "" ~= active then 438 if "" ~= active then
436 web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n") 439 web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n")
437 end 440 end
@@ -487,7 +490,9 @@ if nil == web then C("opening mirrors file - " .. e) else
487 490
488 "<table>\n<tr><th></th><th>" .. lnk('FTP') .. "</a></th><th>" .. lnk('HTTP') .. "</th><th>" .. lnk('HTTPS') .. "</th><th>" .. lnk('RSYNC') .. "</th>" .. 491 "<table>\n<tr><th></th><th>" .. lnk('FTP') .. "</a></th><th>" .. lnk('HTTP') .. "</th><th>" .. lnk('HTTPS') .. "</th><th>" .. lnk('RSYNC') .. "</th>" ..
489 "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" .. 492 "<th>" .. lnk('DNS round robin', 'DNS-RR') .. "</th><th>" .. lnk('Protocol') .. "</th><th>" .. lnk('URL sanity', 'URL-Sanity') .. "</th><th>" .. lnk('Integrity') .. "</th>" ..
490 "<th>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th></tr>\n") 493 "<th>" .. lnk('Updated') .. "</th><th colspan='2'>" .. lnk('Speed range', 'Speed') .. "</th>" ..
494 "<th colspan='2'>" .. lnk('Weekly averages', 'Weekly') .. "</th><th>" .. lnk('Graphs') .. "</th></tr>\n"
495 )
491 for k, v in APT.orderedPairs(APT.debians) do 496 for k, v in APT.orderedPairs(APT.debians) do
492 if '' == bg then bg = " style='background-color:#111111'" else bg = '' end 497 if '' == bg then bg = " style='background-color:#111111'" else bg = '' end
493 local results = APT.collateAll(APT.debians, 'results', k) 498 local results = APT.collateAll(APT.debians, 'results', k)
@@ -512,6 +517,8 @@ if nil == web then C("opening mirrors file - " .. e) else
512 local min = tonumber(results.speed.min) 517 local min = tonumber(results.speed.min)
513 local max = tonumber(results.speed.max) 518 local max = tonumber(results.speed.max)
514 local spd = '<td></td><td></td>' 519 local spd = '<td></td><td></td>'
520 local week = '<td>xxx% up</td><td>xxx% updated</td>'
521 local graph = '<a href="../apt-panopticon_cgp/host.php?h=' .. k .. '">graphs</a>'
515 522
516 -- DNS-RR test. 523 -- DNS-RR test.
517 if ("deb.devuan.org" ~= k) and (nil ~= APT.debians["deb.devuan.org"]) then 524 if ("deb.devuan.org" ~= k) and (nil ~= APT.debians["deb.devuan.org"]) then
@@ -552,8 +559,8 @@ if nil == web then C("opening mirrors file - " .. e) else
552 end 559 end
553 560
554 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns .. 561 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns ..
555 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. sanity .. 562 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td><td>" .. updated ..
556 "&nbsp;</td><td>" .. integrity .. "&nbsp;</td><td>" .. updated .. "&nbsp;</td>" .. spd .. "</tr>\n") 563 "&nbsp;</td>" .. spd .. "&nbsp;" .. week .."&nbsp;<td>" .. graph .. "</td></tr>\n")
557 if "" ~= active then 564 if "" ~= active then
558 web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n") 565 web:write("<tr><td style='background-color:dimgrey'>" .. active .. "</td></tr>\n")
559 end 566 end