aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2022-01-25 05:11:16 +1000
committeronefang2022-01-25 05:11:16 +1000
commit4b5ff1ce12a2f418eb55b1a062515fe600a6c4b1 (patch)
tree8c993d98f73458addc28ce9a01980f2046f61c5c
parentOops, use .value for the actual, you know, value. (diff)
downloadapt-panopticon-4b5ff1ce12a2f418eb55b1a062515fe600a6c4b1.zip
apt-panopticon-4b5ff1ce12a2f418eb55b1a062515fe600a6c4b1.tar.gz
apt-panopticon-4b5ff1ce12a2f418eb55b1a062515fe600a6c4b1.tar.bz2
apt-panopticon-4b5ff1ce12a2f418eb55b1a062515fe600a6c4b1.tar.xz
Tick or cross in the table for DNS-RR.
-rw-r--r--Report-web_3.html5
-rwxr-xr-xapt-panopticon-report-email-web.lua21
2 files changed, 14 insertions, 12 deletions
diff --git a/Report-web_3.html b/Report-web_3.html
index 632e6f4..6eac6f7 100644
--- a/Report-web_3.html
+++ b/Report-web_3.html
@@ -7,7 +7,10 @@
7 <p><font color='aqua'><b>TIMEOUT</b></font> or <font color='blue'><b>TIMEOUT</b></font> means the mirror had too many timeouts, and tests where aborted, so there is no result for this test.</p> 7 <p><font color='aqua'><b>TIMEOUT</b></font> or <font color='blue'><b>TIMEOUT</b></font> means the mirror had too many timeouts, and tests where aborted, so there is no result for this test.</p>
8 <p>NOTE: timeouts may be due to a problem on the testing computer, it might be busy with other things, or be having it's own network problems.</p> 8 <p>NOTE: timeouts may be due to a problem on the testing computer, it might be busy with other things, or be having it's own network problems.</p>
9 <p>NOTE: the speed of the server this checking script is running on might be wildly exaggerated, it doesn't have to go through the Internet to download from itself.</p> 9 <p>NOTE: the speed of the server this checking script is running on might be wildly exaggerated, it doesn't have to go through the Internet to download from itself.</p>
10 <p>The DNS round robin (DNS-RR) column shows the IPs for that mirror, or <font color='grey'><b>no</b></font> if it isn't part of the DNS-RR. &nbsp; The IPs link to the testing log for that IP accessed via the DNS-RR. &nbsp; deb.devuan.org is the DNS-RR itself, so it doesn't get tested directly.</p> 10 <p>The DNS round robin (DNS-RR) column shows the IPs for that mirror, or <font color='grey'><b>no</b></font> if it isn't part of the DNS-RR. &nbsp; The IPs link to the testing log for that IP accessed via the DNS-RR.
11 &nbsp; If a mirror <a href='DNS-RR_good.txt'>should be</a> it is marked with '<font color='green'><b>&#x2705;</b></font>', if it <a href='DNS-RR_bad.txt'>should not be</a> it is marked with '<font color='red'>&#x274c;</font>'.
12 &nbsp; deb.devuan.org is the DNS-RR itself, so it doesn't get tested directly.
13 </p>
11 <p>The time in the Updated column is how often the mirror updates itself.</p> 14 <p>The time in the Updated column is how often the mirror updates itself.</p>
12 <p>Mirrors with a <font style='background-color:dimgrey'>grey background</font> are not active (though may be usable as part of the DNS-RR).</p> 15 <p>Mirrors with a <font style='background-color:dimgrey'>grey background</font> are not active (though may be usable as part of the DNS-RR).</p>
13 <p><font color='grey'><b>skip</b></font> means that the test hasn't been written yet.</p> 16 <p><font color='grey'><b>skip</b></font> means that the test hasn't been written yet.</p>
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index dd8cff6..622b0be 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -89,6 +89,7 @@ local status = function(hosts, host, results, typ)
89 89
90 if to then 90 if to then
91 result = "TIMEOUT" 91 result = "TIMEOUT"
92 hosts[host].passed = false;
92 if not s then result = result .. "*" end 93 if not s then result = result .. "*" end
93 if APT.html then 94 if APT.html then
94 if s then 95 if s then
@@ -104,6 +105,7 @@ local status = function(hosts, host, results, typ)
104 end 105 end
105 elseif 0 < e then 106 elseif 0 < e then
106 result = "FAILED" 107 result = "FAILED"
108 hosts[host].passed = false;
107 if not s then result = result .. "*" end 109 if not s then result = result .. "*" end
108 if APT.html then 110 if APT.html then
109 if s then 111 if s then
@@ -206,13 +208,15 @@ local DNSrrTest = function(hosts, k)
206 if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value] then 208 if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value] then
207 if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value][i] then 209 if nil ~= hosts[APT.options.roundRobin.value].IPs[APT.options.roundRobinCname.value][i] then
208 local log = logCount(APT.options.roundRobin.value, i) 210 local log = logCount(APT.options.roundRobin.value, i)
211 local inRR = "<font color='green'><b>&#x2705;</b></font>"
212 if nil ~= log:find("<font color='") then inRR = "<font color='red'>&#x274c;</font>" end
209 if "" ~= log then 213 if "" ~= log then
210 if "" == dns then dns = " " else dns = dns .. space end 214 if "" == dns then dns = " " else dns = dns .. space end
211 dns = dns .. logCount(APT.options.roundRobin.value, i) 215 dns = dns .. inRR .. logCount(APT.options.roundRobin.value, i)
212 else 216 else
213 if "" == dns then dns = " " else dns = dns .. space end 217 if "" == dns then dns = " " else dns = dns .. space end
214 if APT.html then i = "<font color='maroon'><b>" .. i .. "</b></font>" end 218 if APT.html then i = "<font color='maroon'><b>" .. i .. "</b></font>" end
215 dns = dns .. i 219 dns = dns .. inRR .. i
216 end 220 end
217 end 221 end
218 end 222 end
@@ -246,6 +250,7 @@ local makeTable = function(web, hosts)
246 if nil == v.Active then active = 'nil' else active = v.Active end 250 if nil == v.Active then active = 'nil' else active = v.Active end
247 web:write(" <tr style='background-color:dimgrey'><th>" .. k .. "</th> ") 251 web:write(" <tr style='background-color:dimgrey'><th>" .. k .. "</th> ")
248 end 252 end
253 hosts[k].passed = true;
249 local inRR = "<font color='green'><b>&#x2705;</b></font>" 254 local inRR = "<font color='green'><b>&#x2705;</b></font>"
250 local ftp = "<font color='grey'><b>skip</b></font>" 255 local ftp = "<font color='grey'><b>skip</b></font>"
251 local http = status(hosts, k, results, "http") 256 local http = status(hosts, k, results, "http")
@@ -264,14 +269,7 @@ local makeTable = function(web, hosts)
264 local week = '<td>&nbsp;</td><td>&nbsp;</td>' 269 local week = '<td>&nbsp;</td><td>&nbsp;</td>'
265 if nil == rate then rate = '' end 270 if nil == rate then rate = '' end
266 271
267 -- DNS-RR test. 272 if not hosts[k].passed then inRR = "<font color='red'>&#x274c;</font>" end
268-- if nil == http: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
269-- if nil == https: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
270-- if nil == protocol: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
271-- if nil == redirects: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
272-- if nil == sanity: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
273-- if nil == integrity: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
274-- if nil == updated: find('OK') then inRR = "<font color='red'>&#x274c;</font>" end
275 273
276 if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) then 274 if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) then
277 if 0 == max then 275 if 0 == max then
@@ -323,8 +321,9 @@ local makeTable = function(web, hosts)
323 week = '<td>&nbsp;' .. percentUp .. '% up</td><td>&nbsp;' .. percentUpdated .. '% updated</td>' 321 week = '<td>&nbsp;' .. percentUp .. '% up</td><td>&nbsp;' .. percentUpdated .. '% updated</td>'
324-- if ('100.00' ~= percentUp) or ('100.00' ~= percentUpdated) then inRR = "<font color='red'>&#x274c;</font>" end 322-- if ('100.00' ~= percentUp) or ('100.00' ~= percentUpdated) then inRR = "<font color='red'>&#x274c;</font>" end
325 end 323 end
324 if "yes" ~= hosts[k].DNSRR then inRR = " &nbsp; &nbsp; " end
326 325
327 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. dns .. 326 web:write("<td>" .. ftp .. "&nbsp;</td><td>" .. http .. "&nbsp;</td><td>" .. https .. "&nbsp;</td><td>" .. rsync .. "&nbsp;</td><td>" .. inRR .. " " .. dns ..
328 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. redirects .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td>" .. '<td>' .. rate .. 327 "&nbsp;</td><td>" .. protocol .. "&nbsp;</td><td>" .. redirects .. "&nbsp;</td><td>" .. sanity .. "&nbsp;</td><td>" .. integrity .. "&nbsp;</td>" .. '<td>' .. rate ..
329 '</td><td>' .. updated .. '</td>&nbsp;' .. spd .. "&nbsp;" .. week .."&nbsp;</tr>\n") 328 '</td><td>' .. updated .. '</td>&nbsp;' .. spd .. "&nbsp;" .. week .."&nbsp;</tr>\n")
330 if "" ~= active then 329 if "" ~= active then