Commit graph

261 commits

Author SHA1 Message Date
af29977878 Stop auto-creating maps on new regions; keep aggregate edges single-width by default. 2026-08-04 19:09:32 +08:00
4abb037dce Add createTopologyFolder MCP tool for topology regions. 2026-08-04 17:30:56 +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
925726002f Allow editing management IP when updating an existing NE.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 15:35:15 +08:00
c4968e334f Route incomplete topology terminals to NE inventory instead of a mini form.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 15:23:44 +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
14251f4698 Fully clear topology edge port labels when hide-ports is enabled.
Stop falling back to stale labels and pass hidePorts into link aggregation so only ×N remains for bundles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 14:14:45 +08:00
1d742e58a1 Hide port names on aggregated topology links when hide-ports is on.
Bundle edges only keep a ×N count label; single-link ports stay fully hidden.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 14:11:46 +08:00
bee86eea0d Require vendor when completing unmanaged NEs from topology.
Persist vendor on create/update and refresh the canvas node so icon tone matches inventory.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 11:50:05 +08:00
57f45fdaaf Add topology link aggregation and fix WebCRT clipboard.
Default logical bundles for parallel links with optional physical expand and clearer NE-named ports; capture selection on context menu so copy/paste works again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 11:42:41 +08:00
6e7d84b782 Restore topology fitView with off-screen nodes.
onlyRenderVisibleElements leaves nodes unmeasured; fitView now uses includeHiddenNodes so declared sizes still drive the viewport.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 10:53:18 +08:00
4600629d3a Fix topology edges to meet router icons again.
Predetermined handle coords used the 160px node box edges while DOM handles sit on the icon center, leaving a floating gap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 10:47: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
71acbc747f Simplify topology edge selection highlight and remove arrowheads.
Keep straight undirected links that meet nodes; selected edges only get a light blue stroke.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 10:36:04 +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
306f90a21c Refine login layout with left earth stage and natural sunlight.
Move the globe beside the form, drop the orbit ring, and soften a blue atmospheric limb that fades into space.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 09:08:44 +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
bf0dfd66d8 Add standalone topology MCP with skill, scopes UI, and opt-in live sync.
Splits canvas/Fabric tools into netx-topology-mcp, documents install and a companion Cursor skill, lets API keys grant ne:write explicitly, and adds optional topology live sync so operators can watch agent drawing without constant polling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 00:16:02 +08:00
a95b96f648 Collapse port-traffic discover logs by default.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 19:40:04 +08:00
4c256c521a Modernize the NETX login page with brand-first atmosphere.
Refresh typography, soft topology grid backdrop, and motion while keeping the force-change flow on the same shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 19:37:22 +08:00
4c74d34d91 Remove local-account hint from the NETX login page.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 19:27:26 +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
66f26b738d Fix MCP scopes cache sentinel that broke tools/list.
Reuse a stable _UNSET sentinel and unwrap http_json envelopes so auth scope filtering works.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 18:50:40 +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
69b8c7f23c Tone down WebCRT SFTP column headers to plain text.
Global app-main button styles were painting white pills on sort headers; override them to small muted labels that match the panel.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:33:37 +08:00
e684339511 Fix WebCRT Quick Connect stuck on authenticating.
New-session path filled wsUrl after mount, remounting the terminal and dropping the connect wait WS. Mint tickets from sessionId only and ignore late wsUrl changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:17:36 +08:00
fb3da4dfc7 Fix WebCRT terminal not mounting when only sessionId is set.
Reconnect and tab restore clear wsUrl; the pane still gated on wsUrl so Telnet stayed on authenticating with an empty terminal. Mount/render from sessionId instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:14:30 +08:00
c92879daf3 Stop prompting SSH credentials for Telnet WebCRT sessions.
Telnet should authenticate interactively in the terminal; only managed/quick-connect SSH without a saved password opens the credential dialog.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:10:49 +08:00
874a6f193d Stabilize WebCRT multi-tab detach and page navigation.
Mint a fresh ws_ticket on every terminal mount, soft-retry transient WS drops without killing the PTY, auto-reattach on tab focus, and persist open sessions across leaving /webcrt.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 19:04:45 +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
b42f4eb588 Ignore scheduler heartbeat runtime directory.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:37:14 +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
7b62824c2c Improve WebCRT multi-tab performance and inventory auth UX.
Keep two warm terminals, coalesce stdout per frame, trim scrollback, and allow Telnet credential prompts for managed/quick-connect targets.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:32:06 +08:00
03ab449277 Add HTTP concurrency smoke probe for running netx API.
Measure public and authed read latency under worker load and classify Windows ephemeral-port exhaustion separately from server failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:25:27 +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