diff options
Diffstat (limited to 'apt-panopticon-report-email-web.lua')
| -rwxr-xr-x | apt-panopticon-report-email-web.lua | 42 | 
1 files changed, 23 insertions, 19 deletions
| diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index b8b487e..a9852c1 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
| @@ -346,28 +346,32 @@ local makeIPlist = function(hosts) | |||
| 346 | if nil ~= hosts[k].IPs then | 346 | if nil ~= hosts[k].IPs then | 
| 347 | for l, w in pairs(hosts[k].IPs) do | 347 | for l, w in pairs(hosts[k].IPs) do | 
| 348 | if type(w) == "table" then | 348 | if type(w) == "table" then | 
| 349 | n[l] = {} | 349 | -- TODO - don't hard code deb.roundr.devuan.org. | 
| 350 | for i, u in pairs(w) do | 350 | -- Don't output the extra DNS-RR entries that are for admin reasons. | 
| 351 | if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then | 351 | if ((APT.options.roundRobin.value == k) and ("deb.roundr.devuan.org" == l)) or (APT.options.roundRobin.value ~= k) then | 
| 352 | local inRR = "" | 352 | n[l] = {} | 
| 353 | local lc = logCount(k, i) | 353 | for i, u in pairs(w) do | 
| 354 | if checkRR then | 354 | if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then | 
| 355 | -- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. | 355 | local inRR = "" | 
| 356 | inRR = "<font color='green'><b>✅</b></font>" | 356 | local lc = logCount(k, i) | 
| 357 | if nil ~= lc:find("<font color='") then | 357 | if checkRR then | 
| 358 | inRR = "<font color='red'>❌</font>" | 358 | -- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. | 
| 359 | if nil ~= RRbfile then | 359 | inRR = "<font color='green'><b>✅</b></font>" | 
| 360 | local f, e = RRbfile:write(i, '\n') | 360 | if nil ~= lc:find("<font color='") then | 
| 361 | if f == nil then C("writing DNS-RR_bad.txt file - " .. e) end | 361 | inRR = "<font color='red'>❌</font>" | 
| 362 | if nil ~= RRbfile then | ||
| 363 | local f, e = RRbfile:write(i, '\n') | ||
| 364 | if f == nil then C("writing DNS-RR_bad.txt file - " .. e) end | ||
| 365 | end | ||
| 366 | elseif nil ~= RRgfile then | ||
| 367 | local f, e = RRgfile:write(i, '\n') | ||
| 368 | if f == nil then C("writing DNS-RR_good.txt file - " .. e) end | ||
| 362 | end | 369 | end | 
| 363 | elseif nil ~= RRgfile then | ||
| 364 | local f, e = RRgfile:write(i, '\n') | ||
| 365 | if f == nil then C("writing DNS-RR_good.txt file - " .. e) end | ||
| 366 | end | 370 | end | 
| 371 | if "yes" ~= hosts[k].DNSRR then inRR = "" end | ||
| 372 | local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>]   ' | ||
| 373 | if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end | ||
| 367 | end | 374 | end | 
| 368 | if "yes" ~= hosts[k].DNSRR then inRR = "" end | ||
| 369 | local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>]   ' | ||
| 370 | if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end | ||
| 371 | end | 375 | end | 
| 372 | end | 376 | end | 
| 373 | else | 377 | else | 
