Commit graph

233 commits

Author SHA1 Message Date
54747d9afb Fix UME alarm WSS startup NameError for SessionLocal.
Import SessionLocal in ume_alarm_ws_subscription so load_persisted_subscription works at process boot.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 09:41:36 +08:00
83acb5eef1 Move integration health into active tasks and fix dark topology labels.
Drop header netx-api/oclaw pills, restore UME/OClaw runtime rows in ops tasks, and raise node/edge label contrast on the dark canvas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 09:16:52 +08:00
3e7bfdb8e9 Unify dark UI surfaces and add adjustable topology canvas background.
Lazy-load module routes, restyle remaining light cards/modals/sidebars, and let canvas background be tuned from the display menu.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 23:56:18 +08:00
254c50a2c0 Add dark workbench dashboard with host CPU/memory gauges.
Sample Windows CPU via Processor Utility so values match Task Manager, and expose host metrics on /v1/metrics/json for the workbench poll.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 23:20:29 +08:00
8ded8eeb7d Add LLDP pause/resume/stop with restart recovery, and localize ops task titles.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 22:23:44 +08:00
ba038a3af6 Refresh Fabric KPIs live while an LLDP collect job is running.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 21:56:01 +08:00
2cbdc896f6 Skip LLDP placeholder NEs from discovery until credentials are filled.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 20:11:43 +08:00
90bd323115 Include UME inventory NEs in LLDP all-inventory discovery.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 20:06:21 +08:00
af29977878 Stop auto-creating maps on new regions; keep aggregate edges single-width by default. 2026-08-04 19:09:32 +08:00
8991bb31d1 Skip LLDP self-loop edges instead of failing the whole discover apply.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 15:44:46 +08:00
417ed66a53 Remove unused SUPPORTED_DEVICE_TYPES import from managed-ne router.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 14:29:33 +08:00
48cc381afd Allow promoting LLDP/WebCRT placeholder NEs to real device types.
Accept generic/linux on update, expose them in the device-type meta list, and auto-pick zte_zxros when vendor changes from a placeholder type.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 14:27:46 +08:00
bd97e1b875 Reuse stored managed-NE credentials when opening WebCRT from topology.
Deep-link open was missing has_password/protocol, so SSH always prompted for login.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 10:40:22 +08:00
728894a692 Improve topology terminal open flow and edge selection feedback.
Managed NEs reuse stored credentials; unmanaged/LLDP placeholders get an IP and SSH/Telnet form. Selected links now show a clear highlight, and login page flare tweaks are included.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 10:15:59 +08:00
2d92dde8e5 Add filter-based topology bulk writes and refine API key scopes UX.
Filter add/layout/remove keeps MCP payloads small; tokens default MCP scopes and edit them in a modal with a compact help tip.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 07:39:14 +08:00
c13ab48ba7 Improve topology UX, traffic discover logs, and CLI wrap parsing.
Paginate LLDP job items, surface port-traffic raw logs with a 300s default, harden topology discover/edit/zoom/fullscreen, and join mid-token CLI wraps before TextFSM.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 19:24:43 +08:00
d2fb33ec0d Fix ZTE LLDP Scope table parse and skip discover without vendor.
Match ZXROS Scope/Holdtime columns, disable Netmiko cmd_verify on show commands, and do not SSH LLDP when vendor/device_type cannot be resolved.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 23:26:28 +08:00
393fd0e0b4 Switch CLI parsing to TextFSM and polish topology/workbench UX.
Use custom cli_templates plus community ntc-templates for LLDP and port traffic across ZTE/Huawei/Cisco/H3C/Juniper/Nokia, drop regex parsers, and surface Admin/Phy/Prot on port discover. Also batch-add topology NEs and tighten workbench branding.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 23:06:40 +08:00
60186a12e3 Ignore Huawei/ZTE post-login banners when classifying auth failures.
Bastion hop success notices mention authentication failure count and were misread as target_auth_rejected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 20:12:03 +08:00
015b935f81 Fix Alembic brownfield patches aborting the Postgres transaction.
Optional DDL used bare try/except, which left the migration txn aborted so alembic_version never stamped and config-sync APIs failed. Run best-effort statements inside SAVEPOINTs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 20:02:07 +08:00
d26e4ca2fc Fix port-traffic create 500 from legacy task_id NOT NULL.
Brownfield tables still require task_id while ORM only wrote device_id; mirror both columns on write and relax the leftover constraint.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:50:21 +08:00
ce835dde3d Fix port-traffic discover 500 from missing settings import.
Modular split left discover_ports referencing settings without importing it, which raised NameError on pull-ports.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:43:07 +08:00
9314f11ce7 Fix WebCRT sessions killed by StrictMode ws_ticket reuse.
Allow short-lived tickets multiple uses, stop deleting PTY on transient websocket errors, and avoid marking connect complete after a dropped wait loop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:49:29 +08:00
f64835749a Expose worker scheduler health via heartbeat and isolate WebCRT IO.
API /metrics and /health/ready now read a worker heartbeat when collectors are split out; WebCRT blocking I/O uses a dedicated executor so session pumps do not starve the default pool.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:37:06 +08:00
f1263b0848 Start API and collector worker together from one-click scripts.
Default start_netx.ps1/sh now set NETX_RUN_INLINE_SCHEDULERS=false and launch netx_api.worker; stop scripts tear the worker down with the API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:20:13 +08:00
96be90bd1a Harden retention under one-click start: UME raw caps and collection TTL.
Keep inline schedulers as the start_netx.ps1 default while bounding UME raw_json and pruning old NE collection dirs on startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:16:30 +08:00
e0503df8a5 Raise runtime defaults for multi-user shared-server deployments.
Size DB pool, CLI budget, and WebCRT session caps for concurrent operators while keeping hard ceilings and env overrides.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:11:12 +08:00
fa577aa3bd Adopt production-safe runtime defaults and forwarder retry limits.
Lower CLI/WebCRT/audit caps, log startup capacity warnings, and bound oclaw requeues so reconnect storms cannot thrash memory.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:08:28 +08:00
d56020d84c Harden runtime budgets: DB pool, CLI concurrency, timeouts, and metrics.
Add shared CLI budget/timeout with force-close, parallel port-traffic dispatch, unified shutdown, bounded audit queue, output/log caps, and /metrics probes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:02:43 +08:00
2068ce3d04 Split topology discover into target, scan, and job modules.
Keep the discover facade stable for routers/tests while fixing the missing infer_device_type_vendor import on UME target resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:50:10 +08:00
083ff98574 Split ORM models into a domain package with stable re-exports.
Keep from netx_api.models import X working while grouping alarms, UME, managed NE, topology, auth, config sync, and port traffic tables.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:48:37 +08:00
27194a3281 Split topology fabric and views into focused domain modules.
Keep public facades stable while moving nodes/links/peers and tree/graph logic into separate files.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:46:16 +08:00
b866e33f81 Split UME alarm WebSocket consumer into state, log, subscription, and loop modules.
Keep the public facade stable and re-export shared mutable log/connection objects for existing tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:26:40 +08:00
4ec890c407 Split topology classify and config sync services by domain.
Keep public facades stable while moving rules/apply/slices and policy/cycles/snapshots into focused modules.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:21:50 +08:00
58cdbe6165 Split ne_session_factory into templates, CLI hop detection, and connect paths.
Keep the facade for callers, retarget unit-test patches to ne_session_connect, and fix the ConnectHandler coverage case to use a non-Cisco device type.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:15:57 +08:00
96b76294b4 Split UME sync and WebCRT session into focused modules.
Keep public facades stable, re-export symbols tests patch, and fix missing threading import plus reaper fixture state.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:12:55 +08:00
a2f91f6ee2 Split port traffic service and replace deprecated UTC/lifespan APIs.
Keep the public facade stable while moving device CRUD and sample/compare
logic into focused modules, and use naive UTC via timeutil plus FastAPI lifespan.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:06:46 +08:00
6dc3946bc6 Split UME routes and managed-NE service by domain.
Keep thin facades for existing imports, tighten CSV import required columns, and restore Chinese WebCRT connection labels in status responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:03:42 +08:00
b03c92bdef Default collectors inline with the API again.
Frontend+backend start is enough; external worker remains an optional production split.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:55:46 +08:00
136f40cdae Split WebCRT and API startup; default collectors to worker process.
Extract channel/session modules and CLI guard, move UME sidebands out of main, and default NETX_RUN_INLINE_SCHEDULERS off so ops run python -m netx_api.worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:50:52 +08:00
57b3faf9fb Move schema evolution to Alembic with auto-upgrade on API start.
Extract shared brownfield patches, add the legacy revision, and default to upgrade-head plus skip of duplicate inline DDL (with legacy fallback if Alembic fails).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:41:56 +08:00
6e8003be5c Split topology_service into common, fabric, views, and discover modules.
Keep a thin compatibility facade and update discover mocks so existing callers and tests keep working.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:34:59 +08:00
8180f069ea Split UME and alarms routes out of main; align UI scopes.
Extract ume_support/ume_router and alarms_router so main stays startup-focused, add topology fabric/views import surfaces, and gate managed-NE writes by ne:write.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:30:29 +08:00
633a9d55bd Harden auth scopes, SQL/WebCRT gates, and per-install JWT secrets.
Add capability RBAC, Alembic bootstrap, optional worker schedulers, and close public docs by default so lab installs stay usable without shared signing keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:24:34 +08:00
cb8e0d23c5 Polish topology tree UI and harden LLDP peer matching.
Make left-tree selection, hex browser, and sidebar chrome clearer while matching peers by hostname/ports instead of mgmt IP and reducing fabric-node insert deadlocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 15:42:15 +08:00
3908b78dbb Add ops task overview, chart ahead window, and WebCRT lifecycle status.
Unify live runners in /audit/tasks (including UME sync and connect tests), extend port-traffic compare past now via ahead_hours, and distinguish WebCRT connecting/ready/detached.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 14:05:59 +08:00
3f0787da11 Improve port-traffic logs and add manual NE rebind.
Fix unreadable collect-log contrast, surface errors on the Logs button, and let operators re-link a monitor to a chosen inventory NE without wiping samples.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 12:52:26 +08:00
hansjone
a6c7267b47 Add config-sync cycle retention alongside config history keep.
Mirror LLDP job retention so finished sync cycles are pruned by policy while keeping per-NE config version history separate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 03:44:35 +00:00
hansjone
53ddb3b520 Add fabric-node delete on classify inventory for orphans and placeholders.
Allow removing detached or LLDP/WebCRT fabric rows from classify and slices without touching managed/UME inventory; keep UME-only nodes protected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 11:44:35 +08:00
a5a3a4f156 Add topology classify inventory, fabric lifecycle, and broader collect targets.
Treat Fabric as an inventory sheet for role/region tagging and slices; detach fabric links on managed/UME delete instead of cascading map deletes. Extend collection to all managed and UME NEs, show NE source in management, and refine canvas vendor icon tones.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 11:09:58 +08:00