Commit Graph

61 Commits

Author SHA1 Message Date
qinglong 68717daefb feat: Sentinel 支持自定义 API 路径前缀 (base_path)
- 节点编辑对话框新增「API 路径前缀」字段 (默认 /SenSu)
- 后端保存/读取 base_path
- API 响应包含 base_path 供前端回显

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 21:19:25 +08:00
qinglong 3724021d81 style: Sentinel MEM 详情右对齐到标签旁 (12.8/14.8 GB) 2026-06-13 20:50:13 +08:00
qinglong 899bef7781 feat: 设备卡片显示系统名+版本 + 项目根 version.json
- SystemInfoCollector.platform 新增 release 字段 (内核版本)
- Sentinel 卡片每台设备显示: Linux 6.12.23 | aarch64
- 数据刷新时同步更新系统信息行
- 项目根 version.json: 本地版本清单

当前版本检测:
  UpdateService 每6h从 {repo}/raw/branch/{branch}/version.json 拉取
  对比 base_config.yaml 的 framework.version
  远程 > 本地 → 顶栏绿色按钮 + 设置页更新提示

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 20:47:22 +08:00
qinglong 3ca001b938 fix: 进度条平滑过渡 — force reflow 技巧确保 CSS transition 生效
- 临时关 transition → 设旧值 → offsetWidth reflow → 开 transition → 设新值
- DOM 复用: 首次 innerHTML 创建, 后续只改属性
- 进度条从旧值滑到新值, 不再闪现

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 18:19:07 +08:00
qinglong 417213096f fix: Sentinel 清除占位卡片 + 动画延长至 1s 2026-06-13 18:17:26 +08:00
qinglong f3a6e5fbcd feat: Sentinel 数字跳动动画 + 进度条平滑过渡
- 数字 count-up/down: requestAnimationFrame + ease-out cubic, 350ms
- 中间值过渡: 15%→22% 会显示 15.2,16.1,17.5...22.0
- 进度条: CSS transition 自动处理宽度变化
- 卡片 DOM 复用: 更新值而非重建 innerHTML

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 18:12:37 +08:00
qinglong 51c1ee84f0 feat: Sentinel 卡片数据刷新动画
- 卡片更新时背景闪烁 (card-flash keyframe)
- 进度条平滑过渡 (cubic-bezier .6s)
- 数值涨跌颜色: 绿涨↑ 红跌↓ 不变灰色
- 渐变进度条背景
- 存储前值用于趋势对比

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 18:06:06 +08:00
qinglong c416b04798 fix: Sentinel 改用前端轮询替代 SSE (解决 EventSource 认证问题)
SSE 跨 panel_auth 认证层不可靠 → 改用 setInterval 每 2s fetch /sentinel/api/nodes

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 18:00:34 +08:00
qinglong a21e092207 fix: Sentinel SSE URL — /SenSu/plugin/... → /plugin/... (匹配实际路由) 2026-06-13 17:56:57 +08:00
qinglong a2361cf452 fix: Sentinel WebUI — 合并为单页面(仪表盘+节点管理Tab)
插件 Web 页面 key 必须匹配 plugin_name (/plugin/sentinel)
改为单页面 Tab 切换: 仪表盘 + 节点管理

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 15:17:17 +08:00
qinglong 5e74b0aad7 feat: 🛡️ Sentinel 集群监控插件 + API Key 系统 + 框架设置页
== API Key 系统 ==
- services/web_panel/routes/apikeys.py: CRUD + 权限模板 + 过期控制
- panel_auth + _check_plugin_auth 双重验证 (Session → API Key)
- 模板: readonly(只读) / monitor(监控) / full(管理)
- 持久化到 SenSuDB + 过期自动清理

== WebUI 框架设置页 ==
- static/web_panel/pages/settings.html: API Key 管理界面
- 创建对话框 (名称/权限/TTL), 列表表格, 一键删除

== 热重载修复 ==
- PluginService._reload_plugin: 路由器冻结时跳过 (避免破坏已注册路由)

== 🛡️ Sentinel 插件 ==
- 多节点 SenSu 集群性能监控
- 后台 urllib+run_in_executor 轮询 (避免事件循环死锁)
- SSE 实时推送仪表盘
- 节点管理页 (增删改+连接测试+备注)
- 路径: /sentinel/api/nodes

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 15:05:38 +08:00