Commit graph

66 commits

Author SHA1 Message Date
3396111f2d fix(UME): 按现场实测调整请求头并强制HTTP/1.1
- 请求头仅保留 content-type 与 accessToken,不再发送 accept/application

- 统一通过 httpx.Client(http2=False) 调用,避免 UME 在 HTTP/2 下超时

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-08 11:36:06 +08:00
7f2e4ec393 feat(UME): 增加RESTCONF对接与可视化运维页
- 支持 token 获取/续约/断开、DB共享缓存与跨进程单飞锁、keepalive 保活

- 新增 inventory/current/history 告警同步入库与查询接口,前端增加 UME 对接页面与分页

- 修复 stop_netx.ps1 在部分 PowerShell 版本下 Stop-Job -Force 报错

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-08 01:36:53 +08:00
ab1b76dd47 feat(start): auto-install web dependencies when WithWeb is enabled
Install frontend npm dependencies automatically in start_netx so fresh machines can bring up the 5173 Vite UI without separate manual npm install.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 17:38:14 +08:00
d529ff70ff fix(start): launch Vite in foreground API mode when WithWeb is set
Start the web dev server for -WithWeb even without -Background so 5173 is available in the common foreground run path.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 17:26:26 +08:00
dbe3062d1b fix(setup): avoid DO $$ in init_pg role bootstrap
Replace the DO-block role upsert with explicit role existence check plus CREATE/ALTER statements, preventing PowerShell/psql quoting issues on some Windows setups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 17:17:30 +08:00
a0264e5e94 fix(setup): escape DO $$ in PowerShell heredoc
Use escaped $$ delimiters inside the SQL block so PowerShell does not treat them as interpolation and break init_pg on first-run setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 17:13:31 +08:00
46745b372f fix(setup): escape PowerShell vars in printed DATABASE URL
Use ${...} interpolation in init_pg output to avoid InvalidVariableReferenceWithDrive when rendering user:password@host:port.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 17:00:04 +08:00
32bfa78383 feat(setup): add idempotent PostgreSQL bootstrap script for first install
Provide a Windows init script to create/repair the netx role and database with a connection check, and document the step in README so new machines avoid initial auth failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 16:47:12 +08:00
d48cd000d3 fix(scripts): harden stop_netx and tweak start_netx
- Add timeout around Get-NetTCPConnection to avoid hangs; filter invalid PIDs; exit 0 on completion.
- Minor start_netx adjustments.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 11:06:18 +08:00
27c1826fc5 docs: add MIT license, security policy, and README updates
Generic sample import instructions; expand CONTRIBUTING with upstream remote.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 12:53:56 +08:00
45463027df fix: declare httpx dependency for netx API
ap_client uses httpx; missing from requirements caused ModuleNotFoundError when using -SkipInstall.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 12:28:26 +08:00
0e0d6141e0 docs: add CONTRIBUTING and GitHub issue templates
Document fork/PR workflow; add bug and feature issue templates.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 12:17:04 +08:00
b997c3ee49 docs: update sample alarm file path after rename
Keep README key sample path aligned with the renamed CHEN alarm folder and file names.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 00:45:07 +08:00
f718807fa4 docs: document full environment setup and enforce venv startup
Add a from-scratch setup section covering Python, Node/npm, PostgreSQL, and startup commands, and update the startup script to always create/use .venv instead of falling back to system Python.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 23:53:24 +08:00
e50c0b1f0b chore: ignore runtime process artifacts
Exclude scripts/.run runtime logs and pid files from version control and remove previously tracked artifacts from the repository index.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 23:44:44 +08:00
f49c0b5bad feat: initialize netx ops tool repository
Set up netx as a standalone git-managed project with isolated Python dependencies, alarm ingestion/query APIs, oclaw bridge integration, and ops-focused UI enhancements including history and raw field access.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 23:43:21 +08:00