Commit graph

359 commits

Author SHA1 Message Date
68883d1a84 Open WebCRT in its own module tab and fix UTC naive time display.
Config/NE/topology links now focus the webcrt window instead of replacing network routes; formatSystemTime treats naive API timestamps as UTC.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 11:13:22 +08:00
3fc80f55bc Add config snapshot export and treat finished cycles as success.
Per-NE failures stay in fail_count for retry; completed cycles no longer fail the whole run. Configurations page can download txt/zip snapshots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 11:02:07 +08:00
abb5172a8f Restore topology and WebCRT as workbench modules.
Also tighten config-sync policy form alignment and make the network nav collapse control icon-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 10:55:51 +08:00
f5b4a14c0f Harden config sync defaults, crash resume, and network nav collapse.
Disable auto-sync by default, enforce single-flight cycles with crash requeue, delay new scheduled runs after restart, and make the network sidebar collapsible.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 10:43:01 +08:00
0eead0e662 Add industrial config sync separate from collection tasks.
Periodic vendor-aware CLI sync stores zlib snapshots in Postgres with dashboard, retry, and config viewer under Network Management.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 10:25:36 +08:00
2fc47e5135 Add Network Management module with collapsible left nav.
Consolidate devices, topology, alarms, WebCRT, and collection tasks under /network; keep legacy path redirects and workbench entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-31 09:48:31 +08:00
hansjone
3bd5d5b7da Simplify WebCRT device list chrome.
Drop the sidebar refresh control and bordered pager buttons; keep page meta with plain chevrons.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
b8fa2c6725 fix(webcrt): skip Netmiko terminal-length on interactive login.
Keep disable_paging for collection/MCP; WebCRT opens sessions with interactive=True so the device CLI is not pre-seeded.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
9a72a9a099 fix(topology): keep context menu text readable on hover.
Override .app-main button color so dark menu items stay light on hover/focus.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
2f1c33924e Improve topology canvas UX and vendor NE icons.
Replace the top selection bar with a context menu, tighten map/palette cards and fullscreen controls, and tint the router asset by vendor (ZTE keeps default blue).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
658c19e457 fix(auth): attach bearer token to managed-NE import and template download
These raw fetch/navigation paths skipped Authorization after login was required, same class of bug as topology discover stream.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
325bce0413 fix(topology): send auth token on discover stream requests
The SSE discover endpoint used raw fetch without Authorization, so login sessions got unauthorized after auth was enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
a3bdad5be1 fix(auth): sync logout across browser tabs
Listen for localStorage token changes so other open pages clear session state when one tab signs out.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
b540ea21c1 fix(webcrt): resize hop PTY before nested CLI jump
Nested stelnet/telnet captures hop TTY width at start; Netmiko's default 511 cols made mid-line edit redraws wrap and garble in ~80-col WebCRT.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
b690914f18 fix(webcrt): restore arrow keys under application cursor mode
Normalize SS3 arrows to CSI and stop remapping to Ctrl-B so left/right actually move the device cursor after login.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
6d4cd741ef feat(auth): add local login, audit, API keys, and system admin UI
Gate netx Web/API/WebCRT with JWT and per-user API tokens, bootstrap an admin with forced password change, and expose users/audit/API-key management under a System section. MCP can reuse data/auth/mcp_token without extra env for local labs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
14f14d34bd fix(webcrt): remove tab close border by dropping button chrome
Global app button styles forced a boxed ×; use an inline span so it reads as part of the device name.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 02:34:25 +00:00
hansjone
2ac8d96409 fix(webcrt): blend session tab close mark into device name
Remove the boxed close control so the x sits inline with the tab label.
2026-07-30 10:34:25 +08:00
5fa73c9a4f fix(webcrt): close CLI hop sessions when target exit returns to proxy
Nested Huawei/ZTE/Cisco jumps keep the hop channel open after quit/exit; detect nested close or hop prompt return and tear down WebCRT so users cannot operate the proxy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 09:49:31 +08:00
ec736b6dc8 Allow topology discovery to scan UME nodes on the map.
Previously only managed NEs were scanned, so UME-only maps reported Scanned 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 00:42:34 +08:00
bf82a01a03 Stream topology discovery progress and mark missing links stale.
SSE updates the UI per NE; edges not seen in a successful scan turn red and can be cleared.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 00:35:16 +08:00
bfc10ee8cf Add ZTE LLDP brief parsing and UME NEs to topology palette.
ZXROS uses show lldp neighbor brief; topology library can switch between managed and UME inventory.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 00:18:07 +08:00
d3fd840637 fix(webcrt): allow bastion-managed sessions without NE password.
Align session credential checks with connectivity test so target password can live only on the bastion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 00:08:22 +08:00
dc805c2086 Add topology maps with LLDP discovery and React Flow canvas.
Includes map CRUD, graph save, neighbor discover, and UI controls for labels, sidebar, and edge flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 23:53:06 +08:00
3b8342acfb fix(webcrt): keep device echo intact and stop dual-WS steal.
Use raw Telnet reads for ANSI backspace, drop local erase so Tab/completion stays in sync, and make WebSocket attach exclusive so StrictMode remounts cannot drop the first echo.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 22:27:15 +08:00
fae26cf9bb fix(webcrt): restore full login transcript on attach
Keep the complete session_log replay including the final prompt, and stop clearing bootstrap on attach so StrictMode remounts do not blank the CRT.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 19:57:02 +08:00
89ff0a7212 Improve WebCRT UX: real login transcript, session tools, and first-input sync.
Capture Netmiko session_log for login replay, open NE terminals in a fresh tab, tidy the device list UI with reconnect/log/clear/copy, and paint a live prompt after attach so the first keystrokes behave normally.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 19:53:41 +08:00
30f2db9708 fix(webcrt): replay login banner/prompt on attach
Drain and nudge the device prompt after Netmiko login, replay bootstrap stdout when the WebSocket attaches, and surface connect errors in the terminal pane.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 18:54:59 +08:00
8e3bed562f fix(webcrt): map backspace and arrows for network device CLIs
Huawei/ZTE/Cisco Telnet often rejects xterm DEL and CSI arrows; rewrite them to BS and emacs Ctrl-B/F/P/N so editing and history work.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 18:44:13 +08:00
1f2e028337 fix(webcrt): install websockets and connect WS to API in Vite dev
Uvicorn had no WebSocket implementation without the websockets package, causing browser websocket_error. Also bypass flaky Vite WS proxy by targeting :8890 in local UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 17:37:32 +08:00
183cb7eec9 fix(webcrt): keep session across WS remount and fix blank terminal
Allow brief WebSocket re-attach after React StrictMode cleanup, ensure terminal pane has layout height, and show connect status in xterm.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 17:32:23 +08:00
873f2bfe34 feat(webcrt): add CRT-style browser terminal for managed and UME NEs
Ship an ops WebCRT module with xterm.js UI, WebSocket session bridge reusing hop/bastion login, searchable paged targets, and session audit limits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-29 17:23:45 +08:00
88479245bb feat(ne-exec): make max CLI commands configurable and allow traceroute
Add NETX_NE_EXEC_MAX_COMMANDS (default 5, cap 50) and whitelist traceroute/tracert/trace/trace6 prefixes for lab/ops use.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 10:57:55 +08:00
a6a5abc9ef fix(ne-exec): allow no-more in managed NE CLI pipe whitelist
Support Huawei-style display ... | no-more alongside existing read-only pipe filters.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 16:49:44 +08:00
33af0efc98 fix(ne-exec): allow read-only pipe filters in managed NE CLI
Whitelist include/exclude/begin/section/count/match/grep/one-line after show/display pipes while blocking redirect/append/tee/send.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 16:24:47 +08:00
c5973eec69 fix(managed-ne): prevent ume-sync route conflicts and prefer host_name
Ensure fixed managed-ne paths are matched before /{ne_id} so deleting UME-synced NEs no longer triggers managed_ne_not_found, and use UME host_name as the synced display name to align managed NE naming with inventory host identity.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 14:24:19 +08:00
3a35b54f0e fix(managed-ne): keep API list behavior for UI while MCP remains restricted
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 11:24:49 +08:00
987b501e53 fix(managed-ne): require filters for listManagedNe and tighten pagination
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 11:07:47 +08:00
572b0cfd9d Add UME-managed NE sync and batch account tools.
Sync UME inventory into managed NE with source-aware dedupe and cleanup, add one-click account updates for selected or tagged NEs, and expose the new managed NE actions in the web UI while keeping bulk bastion flows compatible with optional target passwords.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 10:52:54 +08:00
775989cad4 Improve UME and managed NE list UI layout and styling.
Reorganize the UME page with collapsible CLI, sync status, and AI alert panels; embed CLI connect config in the main view; move task cards under token status; add tags column to managed NE list; and fix hop/proxy form alignment plus consistent section spacing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 10:22:21 +08:00
39aad258e6 feat(web): poll and display UME CLI connect test results
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 19:56:31 +08:00
e58716c613 fix(web): merge HopProxyFields patches in UME CLI connect panel
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 17:35:10 +08:00
38a1c7f3a9 feat(cli): UME lazy exec via shared profiles and ume_ne_id MCP support
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 17:13:49 +08:00
ba1a40f725 feat(ume): OClaw forwarder runtime task and i18n status codes
Register oclaw_alarm_forwarder in background tasks with pause/resume, emit rt:/ws:/fwd: codes for last_error, and translate them in the UI for English and Chinese.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 10:29:10 +08:00
5a00736f23 fix(bastion): subclass netmiko driver class on Python 3.14
ConnectHandler is a factory function in current Netmiko; subclass the CLASS_MAPPER driver (e.g. ZteZxrosSSH) when wrapping a pre-authenticated Paramiko session.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 22:35:37 +08:00
088e920f9d fix(bastion): match OpenSSH username parsing for protocol-proxy hop
OpenSSH treats the last @ as user/host separator, so the SSH username must be hop@target@ip without duplicating hop_host. Legacy templates with {hop_host} are stripped automatically; connect logs now show bastion_ssh_cli for comparison with manual ssh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 21:49:43 +08:00
79ae5ff31c fix(bastion): use keyboard-interactive auth for protocol-proxy bastions
ZTE-TSM and similar bastions reject standard SSH password auth and require Vault password via keyboard-interactive; connect over an authenticated Paramiko session instead of re-handshaking with Netmiko.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 21:31:46 +08:00
e474c0a431 feat(ume): ne_type filter, rule edit, and pager layout
Match key alerts by optional inventory ne_types, add edit dialog to update device types on existing rules, and keep card pager controls on one row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 20:44:33 +08:00
d5d6d4eada fix(ume): keep key-alert monitor toggle on one line
Use inline-flex layout for the enabled checkbox so the label no longer wraps to a second row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 15:02:11 +08:00
17270a26b6 fix(ume): forward stats by rule_key, rule toggle, and list filters
Aggregate push counts per monitor rule, add enabled PATCH and paginated filtered list API/UI so keyword rules show correct stats without deleting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 14:36:13 +08:00