Browse Source

Try to figure outn what IPs should and should not be in the DNS-RR.

master
onefang 3 years ago
parent
commit
03b9b8ae2a
  1. 28
      apt-panopticon-report-email-web.lua

28
apt-panopticon-report-email-web.lua

@ -309,6 +309,7 @@ end
local makeIPlist = function(hosts)
local m = {}
local adr = ''
local checkRR = hosts == APT.mirrors;
if APT.options.cgi.value then adr = 'php.cgi/' end
adr = '/' .. adr .. 'apt-panopticon/apt-panopticon_cgp/host.php?h='
for k, v in pairs(hosts) do
@ -328,12 +329,26 @@ local makeIPlist = function(hosts)
if type(w) == "table" then
n[l] = {}
for i, u in pairs(w) do
local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] &nbsp; ' .. logCount(k, i)
if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end
local inRR = ""
local lc = logCount(k, i)
if checkRR then
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags.
inRR = "<font color='green'><b>&#x2705;</b></font>"
if nil ~= lc:find("<font color='") then inRR = "<font color='red'>&#x274c;</font>" end
end
local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] &nbsp; '
if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end
end
else
local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] &nbsp; ' .. logCount(k, l)
if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end
local inRR = ""
local lc = logCount(k, l)
if checkRR then
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags.
inRR = "<font color='green'><b>&#x2705;</b></font>"
if nil ~= lc:find("<font color='") then inRR = "<font color='red'>&#x274c;</font>" end
end
local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] &nbsp; '
if "" == log then n[l] = w else n[log .. inRR .. ' ' .. revDNS(hosts, k, l) .. ' ' .. lc] = w end
end
end
end
@ -488,8 +503,11 @@ if nil == web then C("opening mirrors file - " .. e) else
web:write( "<p>This lists each mirror, and the DNS entries for that mirror. &nbsp; " ..
"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; " ..
"If a mirror has a CNAME, that CNAME is listed along with that CNAMEs DNS entries. &nbsp; " ..
"<br>" ..
APT.options.roundRobin.value .. " is the DNS round robin, which points to the mirrors that are part of the DNS-RR. &nbsp; " ..
"If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>' &nbsp; " ..
"If an IP is part of the DNS-RR, it is marked with '<font color='purple'><b>DNS-RR</b></font>'," ..
" 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; " ..
"<br>" ..
APT.options.referenceSite.value .. " is the master mirror, all the others copy files from it. &nbsp; " ..
"</p>\n"
)

Loading…
Cancel
Save