Corrections on user counter and analytics to the kst4contest page

This commit is contained in:
Marc Froehlich
2026-09-12 03:55:27 +02:00
parent b23884bde1
commit 914a06cb7f
4 changed files with 47 additions and 7 deletions
+9 -4
View File
@@ -450,9 +450,9 @@ function validateReport(report, combined) {
if (!report || typeof report !== "object" || Array.isArray(report)) {
throw new Error("GoAccess JSON report must be an object");
}
const requiredPanels = ["visitors", "requests", "status_codes", "geo_location"];
const requiredPanels = ["visitors", "requests", "status_codes", "geolocation"];
if (combined) {
requiredPanels.push("virtual_hosts");
requiredPanels.push("vhosts");
}
if (!report.general || typeof report.general !== "object") {
throw new Error("GoAccess JSON report has no general summary");
@@ -682,10 +682,15 @@ function prepareReport(job, context) {
const args = [
...job.logs,
"--no-global-config",
"--config-file", runConfig,
"--config-file", runConfig
];
if (job.combined) {
args.push("--enable-panel=VIRTUAL_HOSTS");
}
args.push(
"--output", outputJson,
"--output", outputHtml
];
);
context.runGoAccess({
binary: context.goaccessBinary,
args,