24 Commits

Author SHA1 Message Date
Your Name 5c42d802c0 fix: 活跃作业回退统计补充 elap_time + 过滤 T-Pod 占位符
Z1 从 DomainDetail 回退活跃作业时, 之前只统计了 owner/pid/design/t_pod,
漏了 elap_time (运行时间)。现在一并提取, 并过滤 '--' 占位符。
0.0.2
2026-07-17 14:07:49 +08:00
Your Name 4a9c527d6e fix: 进度条改用 table 实现 (Gmail 兼容)
嵌套 div 被 Gmail 过滤导致进度条消失, 且后续 HTML 丢失。
改用 table 实现: 灰色背景轨道 200px, 蓝色填充按利用率百分比。
50% → 100px 蓝色长条, 0% → 无蓝色填充
2026-07-17 13:55:08 +08:00
Your Name 29ddfccc7b fix: 活跃作业从 DomainDetail 回退统计 + 修复 Gmail 嵌套 div 进度条
1. Z1 详细输出把作业存在 DomainDetail 而非 JobInfo, 增加回退逻辑
   按 (owner, pid, design) 去重统计活跃作业数
2. 移除利用率进度条的嵌套 div (Gmail 会过滤导致后续内容丢失)
   改为单元素蓝色进度条
3. 活跃作业卡片显示实际统计数而非 Snapshot 缓存值
2026-07-17 13:51:31 +08:00
Your Name c21f5028dd fix: 邮件 HTML 简化 — 移除 overflow:hidden/linear-gradient/box-shadow
部分邮件客户端过滤这些 CSS 属性导致内容截断。改用纯蓝色背景、
移除阴影和内溢出隐藏,提高邮件客户端兼容性。
2026-07-17 13:37:45 +08:00
Your Name e27655784f fix: Z1 详细输出解析 — Board X has N domains 头匹配
Z1 详细 test_server 输出使用 'Board X has N domains' 格式而非
'Logic drawer X has N domains',导致逐域归属数据(domain_details)
未被解析,邮件中缺少用户-LD 板统计。修复后 Z1/Z2 两种格式均可解析。
2026-07-17 13:08:01 +08:00
Your Name 793538e19d fix: LD数改为纯数字显示, 移除徽章背景样式 2026-07-17 12:47:56 +08:00
Your Name b4210d74b9 fix: LD板编号格式简化为 LD0 LD1 (去除 Rack/Cluster 前缀) 2026-07-17 12:46:19 +08:00
Your Name 7e0261341e fix: 邮件用户统计 HTML 表增加 LD 板编号列 2026-07-17 12:44:51 +08:00
Your Name 07867eaefc feat: 邮件报告增加用户-LD 板使用统计
- 在 _collect_report_data 中聚合 DomainDetail 按用户统计 LD 板使用
- 纯文本版新增【用户-LD 板统计】版块 (用户/LD板/Rack/T-Pod/设计)
- HTML 版新增紫色标题表格, 紫色徽章显示 LD 数
- 自动过滤 NONE/UNOWNED/FREE/AVAILABLE 等无主域
- 过滤 T-Pod 占位符 '--' (包括 '24 --' 含 -- 的值)
2026-07-17 12:39:38 +08:00
Your Name b5205d0543 feat: 用户视角 — 按用户聚合 LD 板使用信息
- 新增 DomainDetail 数据模型存储逐域归属 (Owner/PID/T-Pod/Design)
- 解析详细版 test_server 输出 (Logic drawer X has N domains 格式)
- 新增 /users 页面 + /api/users API 按用户聚合 LD 板
- 修复邮件配置保存时中文逗号收件人分割问题
- 修复邮件发送时 ASCII 编码错误 (收件人含中文逗号)
2026-07-15 12:32:48 +08:00
Your Name d8eb6824b8 fix: email config save 返回缺少 enabled 字段导致前端显示配置不完整 0.0.1 2026-07-15 12:09:04 +08:00
Your Name f3145369c4 fix: 解析器支持 Z2 'logic drawers' 输出格式
Cluster 正则从硬编码 'boards' 改为兼容 'boards|logic drawers',
修复 Palladium Z2 test_server 输出无法解析逻辑板信息的问题。
2026-07-14 16:05:12 +08:00
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 ac9a060b46 feat: 新增 systemd service 文件 (palladium-monitor.service) 2026-07-08 14:48:35 +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 3ab73805a3 mail 2026-07-08 13:28:47 +08:00
Your Name da2fd92f07 support python36 2026-07-08 13:00:06 +08:00
AI Agent 5250c2960c Palladium Z1 Monitor - LD逻辑板监控系统
- 解析 test_server -short 输出 (Rack/Cluster/Board/D0-D7)
- 暗色主题仪表板: 逻辑板状态可视化、利用率、作业信息、T-Pod可用性
- 板级统计: 使用/空闲/离线, 利用率趋势图 (Chart.js)
- collect.sh: Shell采集脚本(cron定时推送, 无需Python)
- 历史快照管理: 查看详情/删除/清理
- systemd service 开机自启
2026-07-08 12:51:16 +08:00
AI Agent 91f52941d6 Merge branch 'master' of ssh://git.cnbugs.com:10022/AI-Agent/palladium-monitor 2026-07-08 12:13:49 +08:00
Hermes 187f37f8e7 fix: add 'from __future__ import annotations' for Python <3.10
PEP 585 内建泛型 (tuple[str, str], dict[str, int]) 在 Python 3.9 之前不支持。
PEP 563 让所有 type hint 变成字符串, 兼容 Python 3.7+。

错误: 'type' object is not subscriptable
影响: app.py:1184 start_email_scheduler() -> import mailer -> mailer.py:417
修复: mailer.py / app.py 顶部加 from __future__ import annotations
2026-07-08 12:13:31 +08:00
Your Name 8945073ec6 del 2026-07-08 11:25:50 +08:00
Hermes 535e5832ab feat: initial commit - Palladium Z1 LD monitor
- app.py: Flask + SQLite, parse test_server -short, 3-domain board state
- collect.py: remote collector agent with retry/log/env-loading
- mailer.py: daily report email (SMTP, HTML+text, scheduler)
- install_z1_agent.sh: one-click install for Z1 host
- /api/export: CSV/JSON export with time/source filtering
- /api/email/{status,preview,send}: SMTP config and manual trigger
- Chart.js Y-axis stepSize 0.5 + toFixed(1) for utilization
- README: env-var-based deploy, troubleshooting, gunicorn hooks
2026-07-08 11:13:30 +08:00
AI Agent 26940c4574 feat: initial commit - lightweight ticket system with Flask+SQLite
Features:
- User authentication (login/register)
- Ticket CRUD with status/priority/category
- Rich text description with paste-to-image
- File attachment upload (images/documents)
- Multi-select CC recipients
- Role-based permission control (admin/user)
- In-app notifications
- Statistics dashboard
- Gunicorn production deployment
2026-07-02 15:31:27 +08:00