From 6a669efe0a4aa9efeb3131df140e4dafa16f5aec Mon Sep 17 00:00:00 2001 From: qinglong Date: Sat, 13 Jun 2026 21:43:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Sentinel=20=E6=A8=AA=E7=89=88=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E5=B8=83=E5=B1=80=20=E2=80=94=20=E6=8A=98=E7=BA=BF?= =?UTF-8?q?=E5=9B=BE=20+=20=E5=85=A8=E8=A1=8C=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增布局切换按钮: 网格/横版 - 横版: 每设备占满一行, 左信息 + 中折线图 + 右数字 - 复用 MiniChart 组件 (CPU/MEM/NET 三图) - 切换时销毁旧图重建, 避免内存泄漏 Co-Authored-By: Claude --- plugins/sentinel/dashboard.html | 140 +++++++++++++++++++++++--------- 1 file changed, 101 insertions(+), 39 deletions(-) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 0ea9c3c..2a3c32a 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -1,9 +1,11 @@

🛡️ Sentinel 集群监控

-
+
+ | +
@@ -52,6 +54,15 @@ .node-sys { font-size:.75rem; color:var(--text-dim); margin-bottom:4px } .node-url { font-size:.75rem; color:var(--text-dim); margin-bottom:8px; word-break:break-all } .node-notes { font-size:.75rem; color:var(--text-dim); font-style:italic; margin-bottom:8px } + /* 横版布局 */ + #sentinel-grid.layout-row { display:flex;flex-direction:column;gap:12px } + #sentinel-grid.layout-row .node-card { display:grid;grid-template-columns:200px 1fr 180px;gap:16px;align-items:start } + #sentinel-grid.layout-row .node-card .card-left { min-width:0 } + #sentinel-grid.layout-row .node-card .card-mid { display:flex;gap:16px;flex-wrap:wrap } + #sentinel-grid.layout-row .node-card .card-mid .chart-box { flex:1;min-width:120px;height:60px } + #sentinel-grid.layout-row .node-card .card-right { text-align:right } + #sentinel-grid.layout-row .metric-bar { display:none } + #sentinel-grid.layout-row .metric-row { margin-bottom:0 } .metric-row { display:flex; gap:12px; margin-bottom:8px } .metric { flex:1 } .metric-label { font-size:.7rem; color:var(--text-dim); text-transform:uppercase } @@ -74,6 +85,32 @@