소스 수정

This commit is contained in:
2025-12-28 16:17:39 +09:00
parent a29055d181
commit 1801f46c89
3 changed files with 21 additions and 21 deletions

View File

@@ -175,10 +175,10 @@ async function getServerDashboard() {
for (const server of servers) {
// 최신 로그
const snapshot = await queryOne(`
SELECT cpu_usage as cpu_percent, memory_usage as memory_percent, disk_usage as disk_percent, checked_at as collected_at
FROM server_logs
WHERE target_id = $1 AND is_success = 1
ORDER BY checked_at DESC
SELECT cpu_percent, memory_percent, collected_at
FROM server_snapshots
WHERE target_id = $1 AND is_online = 1
ORDER BY collected_at DESC
LIMIT 1
`, [server.target_id])