3864d120fb
Wire alert history items-per-page to the API and parse fire_at ISO strings to datetime so single-shot push schedules save instead of 500.
821 B
821 B
2026-06-08 告警中心每页条数修复
摘要
修复告警历史表格「每页数目」选择无效:此前写死 20 条且未监听 update:items-per-page。
动机
用户切换每页 10/50/100/全部 时 UI 与 API 请求均不变,分页体验与命令日志等页不一致。
变更
frontend/src/pages/AlertsPage.vue:itemsPerPage状态、dataTablePageOptions、onItemsPerPageChange,loadAlerts改用fetchPagePerPage(支持「全部」多页拉取)。server/api/settings.py:list_alert_history的per_page上限 100 → 200,与全站表格选项一致。
验证
cd frontend && npm run build
.venv/bin/pytest tests/integration/test_alerts_audit.py -q
浏览器:告警中心切换每页条数,表格行数与请求 per_page 一致。