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>
This commit is contained in:
qinglong
2026-06-13 15:05:38 +08:00
parent 66ad51002c
commit 5e74b0aad7
6 changed files with 512 additions and 0 deletions
+9
View File
@@ -155,6 +155,15 @@ class PluginService:
logger.debug(f"插件目录已消失,跳过重载: {plugin_name}")
return
# 路由器已冻结时跳过热重载 — 否则路由注册失败导致插件功能丢失
try:
internet = self.service_manager.get_service("internet")
if internet and internet.is_running:
logger.info(f" ⏭ 路由器已冻结,跳过热重载: {plugin_name} (需重启框架)")
return
except Exception:
pass
if plugin_name in self.plugins:
logger.info(f" ⏳ 卸载旧版本: {plugin_name}")
await self.unload_plugin(plugin_name)