feat: 管理界面新增数据浏览页(服务端分页)

- 新增「数据」页:按制式筛选、CGI/小区名称搜索、四种排序,每页 20/50/100 条,数据库端 LIMIT/OFFSET 分页,越界页自动回退到最后一页
- 点击行查看详情:基础字段与 1 公里内高干扰小区数的本期/上期分制式对比
- 首次打开该页才加载,新批次入库后自动刷新;加载中状态与过期请求丢弃,避免界面卡顿
- 新增 GET /api/data 接口(仅管理员),读取失败返回 502
- MySQL 直连与 Metrix 接口两种模式都支持只读查询,接口模式浏览查询超时 20 秒;两种模式数值格式统一
- 搜索词转义引号与 LIKE 通配符,制式、排序、页大小走白名单
- 补充单元测试与中英文文案
This commit is contained in:
2026-11-06 18:02:36 +08:00
parent b487a54b94
commit 4fb44ab27a
10 changed files with 603 additions and 7 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ Use `--window 2026073110001100` to select the natural 15-minute group containing
## Metrix hosted app
The app mode runs InterferenceETL as one long-lived container in Metrix App Hosting. A FastAPI + NiceGUI admin page at `/admin` (Metrix account, admin role only) edits every setting, shows the live log and keeps the run history. The schedule runs inside the same container with APScheduler (fixed interval in minutes or a 5-field cron expression, timezone `Asia/Shanghai`). Each run is a child Python process inside that container, so no extra containers are started; one run at a time, with a per-run timeout.
The app mode runs InterferenceETL as one long-lived container in Metrix App Hosting. A FastAPI + NiceGUI admin page at `/admin` (Metrix account, admin role only) edits every setting, shows the live log, keeps the run history and browses the summary table with server-side paging (`GET /api/data?page=&page_size=20|50|100&network=&q=&sort=`). The schedule runs inside the same container with APScheduler (fixed interval in minutes or a 5-field cron expression, timezone `Asia/Shanghai`). Each run is a child Python process inside that container, so no extra containers are started; one run at a time, with a per-run timeout.
Settings live on the app data volume and are edited only through the admin page: