diff options
| author | onefang | 2020-06-01 19:08:31 +1000 |
|---|---|---|
| committer | onefang | 2020-06-01 19:08:31 +1000 |
| commit | 03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd (patch) | |
| tree | ccafaa2d24facebde268d4eac458299a4c906558 | |
| parent | Don't try to write to a log file we couldn't open. (diff) | |
| download | apt-panopticon-03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd.zip apt-panopticon-03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd.tar.gz apt-panopticon-03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd.tar.bz2 apt-panopticon-03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd.tar.xz | |
Try to figure outn what IPs should and should not be in the DNS-RR.
| -rwxr-xr-x | apt-panopticon-report-email-web.lua | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index 3f80d03..9894de7 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
| @@ -309,6 +309,7 @@ end | |||
| 309 | local makeIPlist = function(hosts) | 309 | local makeIPlist = function(hosts) |
| 310 | local m = {} | 310 | local m = {} |
| 311 | local adr = '' | 311 | local adr = '' |
| 312 | local checkRR = hosts == APT.mirrors; | ||
| 312 | if APT.options.cgi.value then adr = 'php.cgi/' end | 313 | if APT.options.cgi.value then adr = 'php.cgi/' end |
| 313 | adr = '/' .. adr .. 'apt-panopticon/apt-panopticon_cgp/host.php?h=' | 314 | adr = '/' .. adr .. 'apt-panopticon/apt-panopticon_cgp/host.php?h=' |
| 314 | for k, v in pairs(hosts) do | 315 | for k, v in pairs(hosts) do |
| @@ -328,12 +329,26 @@ local makeIPlist = function(hosts) | |||
| 328 | if type(w) == "table" then | 329 | if type(w) == "table" then |
| 329 | n[l] = {} | 330 | n[l] = {} |
| 330 | for i, u in pairs(w) do | 331 | for i, u in pairs(w) do |
| 331 | local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] ' .. logCount(k, i) | 332 | local inRR = "" |
| 332 | if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end | 333 | local lc = logCount(k, i) |
| 334 | if checkRR then | ||
| 335 | -- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. | ||
| 336 | inRR = "<font color='green'><b>✅</b></font>" | ||
| 337 | if nil ~= lc:find("<font color='") then inRR = "<font color='red'>❌</font>" end | ||
| 338 | end | ||
| 339 | local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] ' | ||
| 340 | if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end | ||
| 333 | end | 341 | end |
| 334 | else | 342 | else |
| 335 | local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] ' .. logCount(k, l) | 343 | local inRR = "" |
| 336 | if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end | 344 | local lc = logCount(k, l) |
| 345 | if checkRR then | ||
| 346 | -- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. | ||
| 347 | inRR = "<font color='green'><b>✅</b></font>" | ||
| 348 | if nil ~= lc:find("<font color='") then inRR = "<font color='red'>❌</font>" end | ||
| 349 | end | ||
| 350 | local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] ' | ||
| 351 | if "" == log then n[l] = w else n[log .. inRR .. ' ' .. revDNS(hosts, k, l) .. ' ' .. lc] = w end | ||
| 337 | end | 352 | end |
| 338 | end | 353 | end |
| 339 | end | 354 | end |
| @@ -488,8 +503,11 @@ if nil == web then C("opening mirrors file - " .. e) else | |||
| 488 | web:write( "<p>This lists each mirror, and the DNS entries for that mirror. " .. | 503 | web:write( "<p>This lists each mirror, and the DNS entries for that mirror. " .. |
| 489 | "The IP links point to the testing log files (the overall log is " .. logCount("apt-panopticon") .. ") for each domain name / IP combination that was tested. " .. | 504 | "The IP links point to the testing log files (the overall log is " .. logCount("apt-panopticon") .. ") for each domain name / IP combination that was tested. " .. |
| 490 | "If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. " .. | 505 | "If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. " .. |
| 506 | "<br>" .. | ||
| 491 | APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. " .. | 507 | APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. " .. |
| 492 | "If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>' " .. | 508 | "If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>'," .. |
| 509 | " if it should be it is marked with '<font color='green'><b>✅</b></font>', if it should not be it is marked with '<font color='red'>❌</font>'. " .. | ||
| 510 | "<br>" .. | ||
| 493 | APT.options.referenceSite.value .. " is the master mirror, all the others copy files from it. " .. | 511 | APT.options.referenceSite.value .. " is the master mirror, all the others copy files from it. " .. |
| 494 | "</p>\n" | 512 | "</p>\n" |
| 495 | ) | 513 | ) |
