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