From c71011256ad9f77e478a6c74dcafdb246bb2a05b Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 23 Dec 2019 13:11:26 +1000 Subject: Auto refresh web report. --- apt-panopticommon.lua | 6 ++++++ apt-panopticon-report-email-web.lua | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua index 6aabfee..99dbeaf 100644 --- a/apt-panopticommon.lua +++ b/apt-panopticommon.lua @@ -61,6 +61,12 @@ APT.options = help = "", value = 3, }, + refresh = + { + typ = "number", + help = "", + value = 300, + }, retries = { typ = "number", diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index a30979d..cdfa5bd 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -310,11 +310,17 @@ faulty = "" APT.html = true local web, e = io.open("results/Report-web.html", "w+") if nil == web then C("opening mirrors file - " .. e) else - web:write( "apt-panopticon results\n" .. - '' .. + web:write( "apt-panopticon results\n") + if 0 < APT.options.refresh.value then + web:write('\n') + end + web:write( '' .. "

Welcome to the apt-panopticon results page.

\n" .. - "

This is the status of the mirror servers in the Devuan package mirror network.

\n" .. - "

EXPERIMENTAL CODE - double check all results you see here, and read the logs if it's important.

" .. + "

This is the status of the mirror servers in the Devuan package mirror network.

\n") + if 0 < APT.options.refresh.value then + web:write( '

This page will refresh every ' .. (APT.options.refresh.value / 60) .. ' minutes.

') + end + web:write( "

EXPERIMENTAL CODE - double check all results you see here, and read the logs if it's important.

" .. "

The full list of Devuan package mirrors is available at the URL: " .. "https://pkgmaster.devuan.org/mirror_list.txt

\n" .. "

Due to the nature of the tests, some errors or warnings will be counted several times.   " .. -- cgit v1.1