소스 수정
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user