From 98fc3b797c49bd18f67bdb39f1c24d0ba40cd76a Mon Sep 17 00:00:00 2001
From: onefang
Date: Sat, 4 Jan 2020 17:26:54 +1000
Subject: Add support for using CGI for the PHP graphs.
---
apt-panopticon-report-email-web.lua | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
(limited to 'apt-panopticon-report-email-web.lua')
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index 1a379ec..93700ca 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -307,6 +307,9 @@ end
local makeIPlist = function(hosts)
local m = {}
+ local adr = ''
+ 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
local log = k
local n = {}
@@ -323,15 +326,15 @@ local makeIPlist = function(hosts)
if type(w) == "table" then
n[l] = {}
for i, u in pairs(w) do
- local log = '[graphs] ' .. logCount(k, i)
+ local log = '[graphs] ' .. logCount(k, i)
if "" == log then n[l][i] = u else n[l][log .. " " .. revDNS(hosts, k, i)] = u end
end
else
- local log = '[graphs] ' .. logCount(k, l)
+ local log = '[graphs] ' .. logCount(k, l)
if "" == log then n[l] = w else n[log .. " " .. revDNS(hosts, k, l)] = w end
end
end
- m['[graphs] ' .. log .. " DNS entries -" .. redirs(hosts, k)] = n
+ m['[graphs] ' .. log .. " DNS entries -" .. redirs(hosts, k)] = n
end
return m
end
--
cgit v1.1