Commit Graph

55 Commits

Author SHA1 Message Date
PTah 3292f77e5c fix: отмена скана при исчерпании соединений Postgres
- Распознавание 53300/too many clients и др. в isStoreCapacityOrConnExhausted

- SaveHostResult/порты/SNMP: при фатальной ошибке БД — CancelScan; ctx отменяет дальнейший SNMP

- Воркеры при ctx.Done быстро скипают оставшиеся IP без SNMP (дренаж канала)

Made-with: Cursor
2026-04-13 15:41:16 +10:00
PTah 0086302605 fix: 503 при сбое GetScan вместо ложного 404 scan not found
- Store.GetScan возвращает (job, ok, error); Postgres отдаёт err при ошибке БД/JSON

- API: getScanOrWriteError → 503 scan storage temporarily unavailable

- Web UI: понятное сообщение для HTTP 503 при опросе скана

Made-with: Cursor
2026-04-13 15:38:04 +10:00
PTah 6ad59c9990 fix: ограничить пул Postgres и реже писать прогресс скана
- DB_MAX_OPEN_CONNS (25), DB_MAX_IDLE_CONNS (10), DB_CONN_MAX_LIFETIME_SEC (1800)

- Throttle UpdateScan прогресса в Runner (500ms), меньше одновременных запросов к БД

Устраняет FATAL too many clients при больших сканах и частом опросе GetScan

Made-with: Cursor
2026-04-13 15:33:25 +10:00
PTah 088be32ec5 feat: отмена скана на сервере, стабильнее scan_id, упрощённый UI
- Runner: context, POST /api/scans/{id}/cancel, частичный canceled; Start до ответа createScan

- API: scanPathID (PathUnescape), лог при 404; Postgres GetScan логирует ошибки чтения

- newScanID: суффикс 8 hex; тест обновлён

- Web UI: убраны строки scan_id/from-to; скрытое поле scanId; cancel при таймауте/новом скане

Made-with: Cursor
2026-04-13 15:26:23 +10:00
PTah 5b3eeaed45 feat: human-readable scan_id from UTC time + request CIDRs + short random suffix
Made-with: Cursor
2026-04-13 14:55:40 +10:00
PTah 635876bbe3 fix(ui): device row selection without full table rebuild; stable detail panel height
Made-with: Cursor
2026-04-13 14:49:43 +10:00
PTah 70fff4f0ea fix(scan): two-phase progress + hosts_processed; clarify status at 99% SNMP tail
Made-with: Cursor
2026-04-13 13:53:46 +10:00
PTah 0de279926f fix(ui): single-flight scan poll so status line does not alternate
Made-with: Cursor
2026-04-13 13:45:54 +10:00
PTah 42e3c0c925 feat(mac-locations): VLAN-aware port MAC counts, access/trunk thresholds, likely_attachment
Made-with: Cursor
2026-04-13 13:11:20 +10:00
PTah 2d8992549b fix(ui): move MAC search under scan_id with visible styling and label
Made-with: Cursor
2026-04-13 13:01:36 +10:00
PTah 9cdd966039 fix(db): strip NUL bytes from SNMP strings before PostgreSQL insert
Made-with: Cursor
2026-04-13 12:59:13 +10:00
PTah 2ee86598f6 fix(ui): Enter in CIDR field runs create scan and wait
Made-with: Cursor
2026-04-13 12:54:31 +10:00
PTah d85ec9ff61 feat: MAC lookup in scan FDB (API mac-locations, UI table, index)
Made-with: Cursor
2026-04-13 12:41:48 +10:00
PTah 886300b6c0 feat: VLAN in FDB, persist vlan, enrich port-devices with hostname, UI columns
Made-with: Cursor
2026-04-13 12:38:05 +10:00
PTah 927110167c feat(ui): highlight port/MAC rows, FDB MAC/IP columns in table 1
Made-with: Cursor
2026-04-13 12:15:54 +10:00
PTah d850ce5019 fix(db): do not create bridge_port index in 003 before column exists
Made-with: Cursor
2026-04-13 12:04:35 +10:00
PTah 936cc6b9bb fix(snmp,db): save FDB to PG (empty inet null), bridge_port + MAC normalize
Made-with: Cursor
2026-04-13 11:58:48 +10:00
Луценко Андрей Анатольевич 264865f9d8 fix(snmp): читать FDB из Q-BRIDGE-MIB для таблицы устройств за портом
Добавил сбор dot1qTpFdbPort и парсинг MAC из хвоста OID-индекса,
чтобы Таблица 2 заполнялась на коммутаторах, где FDB хранится в Q-BRIDGE-MIB (vlan+mac).

Made-with: Cursor
2026-04-10 17:49:23 +10:00
Луценко Андрей Анатольевич 5b82901565 feat(snmp,ui): устройства за портом (MAC/IP) в таблице 2
Добавил сбор FDB/ARP по SNMP (BRIDGE-MIB + ipNetToMedia), хранение и API /port-devices.
В UI Таблица 2 теперь показывает MAC/IP за выбранным портом после клика по строке Таблицы 1.

Made-with: Cursor
2026-04-10 17:44:42 +10:00
Луценко Андрей Анатольевич 526c67b5b1 docs(readme): обновить документацию по последним доработкам
Добавил в README новые API и UI-возможности: IF-MIB интерфейсы, гибкий ввод CIDR,
обновления по LLDP/SNMP, форматирование MAC и админ-очистку данных сканов.

Made-with: Cursor
2026-04-10 16:18:11 +10:00
Луценко Андрей Анатольевич a782d36af9 feat(admin): очистка всех сканов — POST /api/admin/purge-scans + UI (NETTOPO_RESET_DB_SECRET)
Made-with: Cursor
2026-04-10 16:08:35 +10:00
Луценко Андрей Анатольевич a7f80eac9a feat(ui,snmp): IF-MIB интерфейсы в табл.1 связей, слияние с LLDP, сортировка по локальному порту
Made-with: Cursor
2026-04-10 16:04:16 +10:00
Луценко Андрей Анатольевич 2388b5f3ff feat(scan): несколько CIDR в одном поле, перечисление через запятую
Made-with: Cursor
2026-04-10 15:39:52 +10:00
Луценко Андрей Анатольевич a36edbc26b fix(api): SNMP/hosts — одна строка на IP (DISTINCT ON), лимиты для больших сканов
Made-with: Cursor
2026-04-10 15:35:45 +10:00
Луценко Андрей Анатольевич 009aeb5dbf feat(scan): диапазон IPv4-подсетей CIDR–CIDR в поле целей (нормализация в список)
Made-with: Cursor
2026-04-10 15:02:19 +10:00
Луценко Андрей Анатольевич 29bd136cea fix(snmp): OCTET STRING из 6 байт показывать как MAC (aa:bb:...), не 0x...
Made-with: Cursor
2026-04-10 14:58:17 +10:00
Луценко Андрей Анатольевич 1df5ddf67a fix(lldp): локальный порт из индекса OID + lldpLocPortDesc для таблицы связей
Made-with: Cursor
2026-04-10 14:56:43 +10:00
Луценко Андрей Анатольевич 66fc827f75 fix(snmp): LLDP rem table — BulkWalk first, гибкий индекс, fallback GetNext, лог save LLDP
Made-with: Cursor
2026-04-10 14:48:36 +10:00
Луценко Андрей Анатольевич 0659238bea Ping: stop logging every no-reply by default; opt-in NETTOPO_LOG_PING_FAILURES.
Made-with: Cursor
2026-04-10 14:14:25 +10:00
Луценко Андрей Анатольевич 16762c14ac SNMP LLDP: longer timeout, lower MaxRepetitions, Walk fallback after BulkWalk errors (e.g. Ubiquiti EdgeSwitch).
Made-with: Cursor
2026-04-10 13:22:59 +10:00
Луценко Андрей Анатольевич 6d75de1e2e UI: LLDP column in device list with No LLDP data marker.
Made-with: Cursor
2026-04-10 13:17:14 +10:00
Луценко Андрей Анатольевич 7e79072619 UI: click device row to show links table and LLDP text table.
Made-with: Cursor
2026-04-10 13:13:30 +10:00
Луценко Андрей Анатольевич 0f32e0004f UI: sortable device table columns, spring graph layout, edge arrows and link list.
Made-with: Cursor
2026-04-10 13:07:44 +10:00
Луценко Андрей Анатольевич 204b4f8768 UI: explain scan pipeline, live status line, device table; README scan logic.
Made-with: Cursor
2026-04-10 13:01:17 +10:00
Луценко Андрей Анатольевич 659b76f1cf Embed UI in binary (fix 404 when web/ missing from WorkingDirectory). Document logs and troubleshooting.
Made-with: Cursor
2026-04-10 12:28:53 +10:00
Луценко Андрей Анатольевич e25e068515 Pin pgx/v5 to v5.7.4 for compatibility with Go 1.22 (apt on Ubuntu 24.04).
Made-with: Cursor
2026-04-10 12:21:19 +10:00
Луценко Андрей Анатольевич f082e9fc11 Document go.sum, module proxy, and optional vendor in README.
Made-with: Cursor
2026-04-10 09:54:31 +10:00
Луценко Андрей Анатольевич b6fc31c361 Add go.sum for reproducible module checksums and server builds.
Made-with: Cursor
2026-04-10 09:52:36 +10:00
Andrey Lutsenko c7c2bcd3fb Add tomorrow handoff guide and update docs.
Create NEXT_STEPS file with concise restart plan and link it from README and technical specification.

Made-with: Cursor
2026-04-09 22:23:02 +10:00
Andrey Lutsenko 235b996c5c Add standalone manual acceptance checklist.
Create dedicated cross-platform manual test checklist and link it from docs and technical specification.

Made-with: Cursor
2026-04-09 22:20:00 +10:00
Andrey Lutsenko 231c9045df Add scan creation and completion watch in UI.
Allow creating scans by CIDR from web UI and polling scan status until terminal state before refreshing topology.

Made-with: Cursor
2026-04-09 22:17:51 +10:00
Andrey Lutsenko 396d139482 Add JSON export actions for topology and diff.
Provide UI buttons to export latest topology and diff payloads into downloadable JSON files.

Made-with: Cursor
2026-04-09 22:15:44 +10:00
Andrey Lutsenko 22c07c7fb1 Add topology legend and node visibility filters.
Show color legend and allow filtering graph nodes by all/new/missing states after scan diff analysis.

Made-with: Cursor
2026-04-09 22:13:36 +10:00
Andrey Lutsenko 6f6b822f16 Improve UI with scan selectors and diff host highlighting.
Add scan dropdown selectors and highlight new/missing hosts directly on topology graph from diff results.

Made-with: Cursor
2026-04-09 22:11:13 +10:00
Andrey Lutsenko 975a45ffd6 Enhance UI with latest-scan and inline diff tools.
Add automatic latest scan selection and two-scan diff viewer in web UI, then reflect completion in technical specification checklist.

Made-with: Cursor
2026-04-09 22:08:55 +10:00
Andrey Lutsenko f1545b2afd Add minimal topology web UI and serve static files.
Provide browser-based topology viewer at root path and update technical spec checkboxes for completed UI milestone.

Made-with: Cursor
2026-04-09 22:07:15 +10:00
Andrey Lutsenko df32d43ac5 Add scan diff endpoint and update spec checklist.
Compare two scans by alive hosts and LLDP-derived links, then reflect completed diff milestone in technical spec.

Made-with: Cursor
2026-04-09 22:05:09 +10:00
Andrey Lutsenko ab94409a52 Add topology endpoint and checklist tracking in spec.
Expose nodes/edges topology view and convert technical spec progress items to checkbox status.

Made-with: Cursor
2026-04-09 22:02:33 +10:00
Andrey Lutsenko 9e678fcfc7 Add derived links endpoint from LLDP and SNMP data.
Build link views from LLDP neighbors and resolve targets by matching remote system names to SNMP sysName entries.

Made-with: Cursor
2026-04-09 22:00:14 +10:00
Andrey Lutsenko ec7abe384d Add LLDP neighbor collection and endpoint.
Collect LLDP-MIB neighbor fields during SNMP scans, persist records, and expose LLDP results via REST.

Made-with: Cursor
2026-04-09 21:58:30 +10:00