fix: server_stats column names + remove hardcoded spamassassin unknown

system.php: INSERT used wrong column names (cpu_pct/ram_pct/disk_pct/
load_1m) — table has cpu_usage/ram_usage/disk_usage/load_avg matching
migration 007. Fatal PDOException was crashing stats API → all services
showing as unknown.

admin.js mailServer(): remove spamassassin row (not installed, was
permanently hardcoded to 'unknown').

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 11:23:20 +00:00
parent 0bdaa048df
commit c80513d17b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -311,8 +311,8 @@ match ($action) {
// Persist to DB for history
$db->execute(
"INSERT INTO server_stats (cpu_pct,ram_pct,disk_pct,load_1m,load_5m,load_15m) VALUES (?,?,?,?,?,?)",
[$cpuPct, $ramPct, $diskPct, $load[0], $load[1], $load[2]]
"INSERT INTO server_stats (cpu_usage,ram_usage,disk_usage,load_avg) VALUES (?,?,?,?)",
[$cpuPct, $ramPct, $diskPct, $load[0]]
);
Response::success([