소스 수정

This commit is contained in:
2025-12-28 16:18:02 +09:00
parent 1801f46c89
commit 56451c8070
4 changed files with 29 additions and 30 deletions

View File

@@ -30,16 +30,15 @@ export default defineEventHandler(async (event) => {
const snapshots = await query(`
SELECT
log_id,
cpu_usage as cpu_percent,
memory_usage as memory_percent,
disk_usage as disk_percent,
is_success as is_online,
checked_at as collected_at
FROM server_logs
snapshot_id,
cpu_percent,
memory_percent,
is_online,
collected_at
FROM server_snapshots
WHERE target_id = $1
AND checked_at >= NOW() - INTERVAL '${interval}'
ORDER BY checked_at ASC
AND collected_at::timestamp >= NOW() - INTERVAL '${interval}'
ORDER BY collected_at ASC
`, [targetId])
return {