1.2 KiB
1.2 KiB
2026-06-09 告警分页 + 调度单次保存修复(部署)
摘要
修复告警中心「每页数目」无效;修复新建文件推送单次调度保存 HTTP 500(fire_at ISO 字符串未解析为 datetime)。
动机
- 告警表
items-per-page写死 20,未绑定update:items-per-page - 默认
run_mode=once提交fire_at字符串,ORMDateTime列拒绝写入
涉及文件
frontend/src/pages/AlertsPage.vue—itemsPerPage+fetchPagePerPageserver/api/settings.py—per_page上限 200server/api/schema_path_validators.py—coerce_optional_iso_datetimeserver/api/schemas.py—ScheduleCreate/Update解析fire_attests/integration/test_schedules.py— once 创建用例scripts/prod_health_check.sh— 生产健康脚本web/app/— vite 构建产物
迁移 / 重启
无需 DB 迁移;需重建镜像/重启 API + 前端静态资源。
验证
.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 条生效。