diff --git a/plugins/sentinel/__init__.py b/plugins/sentinel/__init__.py index 0029418..9f8a0c6 100644 --- a/plugins/sentinel/__init__.py +++ b/plugins/sentinel/__init__.py @@ -47,15 +47,11 @@ class Plugin(PluginWebMixin): except Exception as e: logger.warning(f"Sentinel network skip: {e}") - # 注册 WebUI 页面 - for fid, title, fname in [ - ("sentinel_dash", "🛡️ Sentinel", "dashboard.html"), - ("sentinel_cfg", "🛡️ 节点管理", "settings.html"), - ]: - p = os.path.join(os.path.dirname(__file__), fname) - if os.path.exists(p): - with open(p) as f: - self.register_web_page(fid, title, f.read(), icon="S" if "dash" in fid else "⚙") + # 注册 WebUI 页面 (key 必须匹配 plugin_name 才能在侧边栏访问) + dash_path = os.path.join(os.path.dirname(__file__), "dashboard.html") + if os.path.exists(dash_path): + with open(dash_path) as f: + self.register_web_page("sentinel", "🛡️ Sentinel", f.read(), icon="S") # 注册 API 路由 if self.network_bridge: diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 58a03a4..02a7a21 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -1,10 +1,43 @@
-
+

🛡️ Sentinel 集群监控

- 连接中... +
+ + +
-
-
加载中...
+ + +
+
+
加载中...
+
+
+ + + + + +