aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-06-01 19:08:31 +1000
committeronefang2020-06-01 19:08:31 +1000
commit03b9b8ae2a9eed23636bd53ab1f6f5a3b483cebd (patch)
treeccafaa2d24facebde268d4eac458299a4c906558
parentDon't try to write to a log file we couldn't open. (diff)
downloadapt-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-xapt-panopticon-report-email-web.lua28
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
309local makeIPlist = function(hosts) 309local 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>] &nbsp; ' .. 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>&#x2705;</b></font>"
337 if nil ~= lc:find("<font color='") then inRR = "<font color='red'>&#x274c;</font>" end
338 end
339 local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] &nbsp; '
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>] &nbsp; ' .. 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>&#x2705;</b></font>"
348 if nil ~= lc:find("<font color='") then inRR = "<font color='red'>&#x274c;</font>" end
349 end
350 local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] &nbsp; '
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. &nbsp; " .. 503 web:write( "<p>This lists each mirror, and the DNS entries for that mirror. &nbsp; " ..
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. &nbsp; " .. 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. &nbsp; " ..
490 "If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. &nbsp; " .. 505 "If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. &nbsp; " ..
506 "<br>" ..
491 APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. &nbsp; " .. 507 APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. &nbsp; " ..
492 "If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>' &nbsp; " .. 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>&#x2705;</b></font>', if it should not be it is marked with '<font color='red'>&#x274c;</font>'. &nbsp; " ..
510 "<br>" ..
493 APT.options.referenceSite.value .. " is the master mirror, all the others copy files from it. &nbsp; " .. 511 APT.options.referenceSite.value .. " is the master mirror, all the others copy files from it. &nbsp; " ..
494 "</p>\n" 512 "</p>\n"
495 ) 513 )