Commit graph

380 commits

Author SHA1 Message Date
3c9e0efd2b feat: unify network and topology table column filters
Replace top filter bars with shared Excel-style column menus, fix select-all and modal interactions, and use plain dropdown indicators. Apply exact-value filters before pagination and export. Isolate pytest database state and cover filter behavior.
2026-10-12 23:36:00 +08:00
f301544b99 Optimize topology canvas per the 2026-10-12 plan.
Save path: one atomic POST /views/{id}/commit (edges, ports, styles, node
add/remove, positions) replaces the multi-request save. Edge styles and
manual-edge port edits now go through dirty/undo/save instead of writing
immediately; non-manual edge ports are read-only.

Data safety: UI saves no longer clear MCP node locks or freeze the device
name into the placement label (label_override + omit-means-keep semantics,
also applied to the MCP positions tool). Adding NEs/neighbors with unsaved
edits now saves first instead of silently dropping them. Positions no longer
bypass membership caps, except persisting synthesized child-region icons.

Fixes found in acceptance: nodes added in the same commit kept (40,40)
under autoflush=False; edits on edges deleted in the same save 404'd the
whole save; box-selection drags and arrow-key moves were not marked dirty;
large canvases far from the origin opened blank and locate did nothing
because fitView waits for measurement that onlyRenderVisibleElements never
does (now fitBounds from known geometry).

Also: batch N+1 lookups in graph/positions, deterministic truncation,
outside-peer scan excludes internal edges, split TopologyPage into hooks,
fix flaky UME/LLDP port test, add scripts/topology_clear_frozen_labels.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:11:22 +08:00
60a0ea6021 Release 0.4.16: keep the login earth spinning under reduced motion.
theme.css squashes every animation to 0.01ms x1 when the OS asks for reduced
motion, so the login earth jumped once and snapped back (position stuck at 0%).
The login stylesheet already intends the ambient spin to stay; restore it with a
class selector that outranks the universal rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 19:40:05 +08:00
af8d5a8d37 Track web/src/features/ume: anchor the ume/ ignore rule to the repo root.
Some checks failed
Release Windows / build (push) Has been cancelled
The unanchored 'ume/' rule also matched web/src/features/ume/, so UmePage was
never committed and clean checkouts failed to build (App.tsx imports it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 14:59:26 +08:00
315539e0fd Optimize cutover compare/monitor per the 2026-10-12 plan.
Correctness (A): normalize port-map names with the template rules (snapshot v2,
v1 replays unchanged); protect mappings/templates that are referenced; stop
dropping edited mapping text; accept pulled-but-not-shutdown ports as migrated;
validate baseline ownership on project create; one canonical key form; fix
built-in template tolerances and upgrade old packaged values in place.

Cross-vendor identity (B): single identity pipeline for every path, per-side and
per-vendor interface rules, value maps, filters after normalization, mapping
pre-flight for compare and cutover projects, SQL eligibility fixes.

Data quality (V): no_data / suspect_parse / not_collected sheet states, command
slice coverage, directional compare modes, value-sorted duplicate pairing,
before-side raw names in results and CSV.

Robustness (H): bounded auto-run history, background evaluate/finish with
polling, manual route tables out of the acceptance gate, baseline row cache,
scoped duplicate-key failures, merged HF tasks with a per-NE session cap,
same-device cutover, explicit scope_by_port_map, read-only GETs, resolvable red
tickets.

Frontend: pre-flight report, mapping table view, template editor support for the
new rules, data-state banners. Docs: canonical field contract.

Not included: Huawei status parsers (no real samples), SQL-path route compare.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 11:51:55 +08:00
e3a15c3d7b Add page-size selector and jump-to-page to the audit log table.
Use the shared ListPager (10/20/50/100/200 per page, remembered in
localStorage, default 20 instead of a fixed 10), keep the previous rows while the
next page loads and clamp the page when the total shrinks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 07:34:30 +08:00
45de8144a3 Speed up WebCRT and record audited commands from the device echo.
Performance: event-driven stdout pump (no polling thread per socket, no 200ms
coalescing stall), keystrokes written immediately, blocking SSH reads, bounded
deque queue with batch drain, incremental UTF-8 decode, buffered session log,
non-blocking session teardown, shorter login/settle waits, xterm WebGL renderer
and idle-time direct writes. Zero-latency fake device: echo p50 11ms -> 2.3ms,
command RTT 219ms -> 20ms, bulk output 2.1 -> 8.3 MB/s.

Audit: track the device's own input row server-side (webcrt_cmd_audit) and
resolve each Enter from the echoed line feed, so Tab, backspace, cursor-key
edits, history recall, paste, Ctrl-C and pagers record what actually ran.
Password lines are redacted; pending Enters are flushed on close.

Hop: stop closing the hop session when the target prints the same prompt as the
hop (system-view); recognise the Huawei "closed by the remote host" message.
Generic NEs that show a network prompt now get the network key map.

Adds bench_webcrt.py, fake_ssh_device.py and e2e_webcrt_input_scenarios.py.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 07:34:30 +08:00
0d894efe5e Refactor web UI: feature-first structure, tokenized styles, modern blue theme.
Structure
- pages/ -> features/<domain>/{Page, components, hooks, lib}; 95 files moved,
  333 imports rewritten, verified with tsc.
- services/api.ts -> services/api/<domain>.ts (250 exports preserved),
  types.ts -> types/<domain>.ts, i18n zh/en -> locales/<lang>/<namespace>.ts
  (2696 messages deep-equal before/after).
- ESLint rule: shared layers must not import features/.

Styles
- index.css (16k lines) split losslessly into styles/{base,layout,components,
  pages,legacy,theme}; compiled CSS was byte-identical before tokenizing.
- ~930 hard-coded colors replaced by --nx-* tokens (theme/tokens.css); WebCRT
  off-palette colors unified; fixed dark-on-dark text introduced by mapping.
- theme/theme.css: modern blue design language (rounded shapes, gradients,
  unified buttons/fields/tables/modals), form-grid alignment fix, flat nav list
  without tree indent, soft selected state instead of left accent bar.

Docs: WEB.md documents code structure and style rules.
Not touched: the large Biz*/Webcrt/Topology page components (to be split later).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 03:17:51 +08:00
3b45d6abe3 Improve WebCRT connect UX and terminal input handling.
Open shells asynchronously with clearer prompt settling, fix Telnet CRLF expansion, and add right-click paste with safer focus behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 22:55:31 +08:00
1463652dbb Tighten NetX help copy and structure HelpHint typography.
Remove permanent list-page hint banners, keep concepts in short HelpHint popovers with scannable sections and lists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 16:44:10 +08:00
046029aa16 Unify NetX UI to compact ops chrome and add API key purge.
Align network/list shells and audit header with industrial panels; allow permanently deleting revoked API keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-11 16:20:31 +08:00
4d60601050 feat(cutover): add live fullscreen monitoring wall 2026-10-11 09:08:03 +08:00
b9d5e27cc4 feat(cutover-ui): show paired timing and manual route configuration 2026-10-11 08:48:20 +08:00
32d7d969f6 feat: refine cutover operations board and monitoring performance
Protect previous wave coverage, normalize batch identities, cache shared metric evidence, and batch diff inserts. Add live continuity KPIs, server paging and filters, scoped business selection, and preserve legacy monitor rule metadata.

Validation: 198 backend tests passed with 1 opt-in benchmark skipped; 14 frontend unit tests and 24 browser checks passed; TypeScript and production build passed.
2026-10-11 07:55:04 +08:00
355bcfc4c0 feat(biz-compare): preserve templates and refine industrial editor 2026-10-11 06:06:20 +08:00
8c15975d3e Refine business monitoring UI and protect asynchronous navigation 2026-10-11 00:30:30 +08:00
051a10ad95 Refine business compare configuration and history UI 2026-10-10 23:50:06 +08:00
4d5101ec3a Fix business compare history, search, sampling and exports 2026-10-10 23:20:50 +08:00
ee053f9990 Fix display-column toggle highlight polarity on compare board.
Some checks failed
Release Windows / build (push) Has been cancelled
Highlight when display columns are visible, and use a stable toggle label.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-09 09:55:38 +08:00
1653a31b16 Avoid rounding near-perfect compare pass rates to 100%.
With a few fails among tens of thousands of rows, 1-decimal rounding hid residual failures; keep extra precision so the UI never shows 100% when fails remain.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-09 09:31:04 +08:00
8a79e962a8 Tighten biz compare fullscreen board for cutover scanning.
Collapse equal pair cells, hide display columns by default, fold field filters, and keep failed sheets first so diffs stand out.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 23:37:54 +08:00
ee3ed26c88 Polish biz compare batch list and progress UI.
Show localized phases with progress bars on the runs tab and result board, and make cancel/status easier to act on during long compares.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 23:16:41 +08:00
7b5dd3eada Add per-field compare result filters for live source lookup.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 19:46:41 +08:00
b8c0f96982 Unify compare search via live source lookup; stratify success samples.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 17:47:40 +08:00
dd4195cdbc Compare same-key multipath by order; heartbeat during persist.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 17:14:33 +08:00
2df2f50510 Show compare engine in progress and SQL skip reasons.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 15:56:20 +08:00
ba16167c8e Add SQL JOIN compare for pushdown-safe sheets and mid-run result viewing.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 15:16:40 +08:00
958942c5b6 Add compare batch cancel and restart recovery so stuck runs unblock.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 14:48:10 +08:00
9adf9f2764 Improve compare progress for large BGP sheets.
Show pending check items instead of a fake 100% pass, publish sheet results as each finishes, and use keyset chunk loads with rows-loaded progress.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 14:17:54 +08:00
227959b9a2 Make biz compare async and cutover-friendly for large tables.
Run compares in the background with progress, persist fails first, and store success as sampled key+row_id hydrated from source so million-row sheets no longer block the API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 10:47:39 +08:00
d9b52e35e5 Use vite-only build for Windows release packaging.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 22:53:02 +08:00
8bdaaaacbf Add NE capability descriptors and native async exec jobs for agents.
Expose recommended_mode/hints on getManagedNe, support background exec-jobs with getNeExecJob in MCP, and allow linux_shell on MikroTik as well as Linux.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 18:32:14 +08:00
d701e4a35e Add offline biz_state log import with unified create-task entry.
Create tasks via pick-NE or import log; re-import appends batches like collects, without inventory NE or SSH.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 07:36:11 +08:00
ac53af4a5d Fix vpnv6 ECMP under-parse and persist full CLI line counts.
RR vpnv6 wrap lines with next-hop+metrics were collapsing ECMP legs; store raw_line_count/declared_total before DB truncate so collect stats stay accurate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 14:53:19 +08:00
86fcb98218 Improve biz_state monitor-item table UX with select-all and visible scroll.
Keep the horizontal scrollbar in the viewport, sticky enable/title columns, and show selected/total (and unbound) counts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 11:40:01 +08:00
a1acd4c2af Fix biz_state status while collecting and improve raw log export UX.
Show collecting over paused schedule, enqueue sync so collect_running flips immediately, and expose export on metric sheets with a card layout for Commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 11:19:01 +08:00
05357e971e Fix ZTE BGP RR *i/RD parsing and add batch collect detail UX.
Decouple heavy CLI parse via ParsePool, keep ECMP/multi-RD keys, and expose per-command CLI lines vs DB rows with raw.txt export.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:52:43 +08:00
b453c6871e Document biz_state light/heavy collect timeout env vars.
Add dual-lane READ vs RUN_TIMEOUT_CAP notes to .env.example and WEB.md so operators can raise the ~40min heavy cap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 19:14:16 +08:00
924f9bd2f7 Add collect stop, cutover nav prefetch/cache, and lane labels.
Let operators abort queued/running biz_state batches, speed cutover page switches, and show light/heavy collect lanes on monitor items.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 19:09:18 +08:00
3a0de0d7fb Scale biz_state collects with dedicated workers and non-blocking UI poll.
Add PG claim/NE mutex, persist pool, and biz_state_worker replicas; fix double-SSH and row-count bugs; stop 32m collectNow while-loop from freezing page switches.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 17:00:37 +08:00
c15ea00a23 Show collect start/end times on biz-state task and batch lists.
Helps tune schedule interval from last-run window and batch duration.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:58:32 +08:00
9342c0c7ce Export collect commands with aux by default again.
Match live collect: include discover-backed aux CLIs in plan/export (and unbound sections); primary-only via include_aux=false.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 14:22:46 +08:00
089c88d35e Show aux commands in biz-state UI; keep only config_vrf under BGP VRF summary.
Add an Aux column for each monitor item. Drop ip_route/ipv6_route as summary enrich aux so FIB stays a standalone collect profile. Export defaults to primary commands only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 11:39:44 +08:00
32deca1687 Add one-click export of biz-state collect commands.
Plan enabled monitoring items into concrete CLIs (with aux) and download as txt from the task detail modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 11:18:58 +08:00
1fcd613bc6 Fix empty BGP route false positives and add batch alias UX.
Skip Dest/Network headers when Total routes is 0; capture direction from match groups; expose workbook compare/data/sheet stats and prefer batch aliases in compare/cutover pickers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:58:57 +08:00
f321413dbf Tighten biz-state profiles column widths for a denser layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:54:31 +08:00
ef56f33566 Fix biz-state profiles table horizontal scrollbar in modal.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:52:51 +08:00
908771baea Cache biz-state discover CLI results and improve bind table UX.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:48:43 +08:00
b9be545a75 Add opt-in per-NE CLI exec_policy for MCP/API exec.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:27:40 +08:00
bfac0b53c8 Enable BGP neighbor out profiles and show binding details on double-click.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 09:26:37 +08:00