From 64d148b7711b2abe051c9342dbaaa1a6e1472f7b Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 11:59:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20renderNodes=E5=8A=A0try-catch=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E8=BF=90=E8=A1=8C=E6=97=B6=E9=94=99=E8=AF=AF=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E5=8A=A0=E8=BD=BD=E4=B8=AD=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sentinel/dashboard.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 0533244..4c72540 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -161,6 +161,7 @@ var _firstRender = true; function renderNodes(nodes) { + try { var grid = document.getElementById("sentinel-grid"); if (!nodes.length) { grid.innerHTML = '
暂无节点 — 切换到节点管理添加
'; @@ -360,6 +361,7 @@ card.querySelector('.node-time').innerHTML = '
'+(n.last_seen ? new Date(n.last_seen*1000).toLocaleTimeString() : '—')+'
'; } } + } catch(e) { console.error('renderNodes error:', e); } function bar(v) { return v < 60 ? 'bar-green' : (v < 85 ? 'bar-yellow' : 'bar-red'); } function fmtSizeGB(p) { var u=p.used_gb||0, t=p.total_gb||0; return fmtSize(u*1073741824)+' / '+fmtSize(t*1073741824); }