fix(api): SNMP/hosts — одна строка на IP (DISTINCT ON), лимиты для больших сканов

Made-with: Cursor
This commit is contained in:
Луценко Андрей Анатольевич
2026-04-10 15:35:45 +10:00
parent 009aeb5dbf
commit a36edbc26b
4 changed files with 69 additions and 36 deletions
+2 -2
View File
@@ -418,8 +418,8 @@
deviceTableBody.innerHTML = '<tr><td colspan="5" style="padding:10px;color:#64748b;">Загрузка…</td></tr>';
try {
const [hRes, sRes, lRes] = await Promise.all([
fetch(`/api/scans/${encodeURIComponent(scanId)}/hosts?limit=5000`),
fetch(`/api/scans/${encodeURIComponent(scanId)}/snmp?limit=5000`),
fetch(`/api/scans/${encodeURIComponent(scanId)}/hosts?limit=200000`),
fetch(`/api/scans/${encodeURIComponent(scanId)}/snmp?limit=200000`),
fetch(`/api/scans/${encodeURIComponent(scanId)}/lldp?limit=10000`),
]);
if (!hRes.ok) throw new Error(await hRes.text());