Files
Nexus/docs/changelog/2026-06-09-alerts-schedule-fixes-deploy.md
T

34 lines
1.2 KiB
Markdown
Raw Normal View History

# 2026-06-09 告警分页 + 调度单次保存修复(部署)
## 摘要
修复告警中心「每页数目」无效;修复新建文件推送单次调度保存 HTTP 500(`fire_at` ISO 字符串未解析为 `datetime`)。
## 动机
- 告警表 `items-per-page` 写死 20,未绑定 `update:items-per-page`
- 默认 `run_mode=once` 提交 `fire_at` 字符串,ORM `DateTime` 列拒绝写入
## 涉及文件
- `frontend/src/pages/AlertsPage.vue``itemsPerPage` + `fetchPagePerPage`
- `server/api/settings.py``per_page` 上限 200
- `server/api/schema_path_validators.py``coerce_optional_iso_datetime`
- `server/api/schemas.py``ScheduleCreate`/`Update` 解析 `fire_at`
- `tests/integration/test_schedules.py` — once 创建用例
- `scripts/prod_health_check.sh` — 生产健康脚本
- `web/app/` — vite 构建产物
## 迁移 / 重启
无需 DB 迁移;需重建镜像/重启 API + 前端静态资源。
## 验证
```bash
.venv/bin/pytest tests/integration/test_schedules.py tests/integration/test_alerts_audit.py -q
bash deploy/pre_deploy_check.sh
```
生产:`POST /api/schedules/`once+push)→ 201;告警中心切换每页 50 条生效。