Commit Graph

4 Commits

Author SHA1 Message Date
Hermes 83621cb213 sync: import complete app.py/mailer.py/collect.py + dev customizations
完整功能 (相对于 ac9a060):
- app.py: 1276 行 (vs 633 行) — 含 /api/email/* + /api/export + Chart 小数
- mailer.py: 645 行 — SMTP 邮件模块 + scheduler
- collect.py: 233 行 — Python 3.6 兼容 (typing.Dict 代替 dict[X,Y])
- README.md: 整合版
- templates/email_config.html: 邮件配置 Web UI
- static/style.css: 邮件状态徽章等新样式

清理:
- 删除 'palladium-monitor/' 子目录 (远端残留, 已废弃)
2026-07-08 15:23:24 +08:00
Your Name 6726524c50 fix: db.get_or_404 -> query.get_or_404 + rename to Palladium Monitor
- 修复删除快照时 AttributeError: SQLAlchemy.get_or_404 (低版本兼容)
- UI/标题/邮件主题从 'Palladium Z1 Monitor' 改为 'Palladium Monitor'
2026-07-08 14:46:18 +08:00
Your Name 89dc6b4449 feat: 邮件配置页面 + 数据库持久化
- 新增 /email 配置页面 + /api/email/config API (GET/POST)
- 新增 /api/email/test-send 测试邮件 + /api/email/reset 重置
- EmailConfig SQLite 表持久化配置,回退到环境变量
- mailer: get_config 优先读 DB,send_report 读取 DB 密码
- 修复 _send_smtp 登录使用环境变量密码的 bug
- 前端新增配置表单 (启用开关/SMTP/TLS/认证/发件人/收件人/时间)
- CSS 暗色主题样式 + 响应式适配
- 导航栏新增「设置」链接
2026-07-08 14:36:41 +08:00
Your Name 8945073ec6 del 2026-07-08 11:25:50 +08:00