From 765ce6d819d6bb43a43932a03998d21ca5e5a693 Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 08:26:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BD=91=E6=A0=BC=E5=8A=A8=E7=94=BB=20?= =?UTF-8?q?=E2=80=94=20oldCpu=E8=AF=BB=E5=8F=96=E5=9C=A8setAttribute?= =?UTF-8?q?=E4=B9=8B=E5=89=8D(=E5=80=BC=E4=B8=8D=E5=90=8C=E6=89=8D?= =?UTF-8?q?=E6=9C=89=E5=8A=A8=E7=94=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sentinel/dashboard.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 861f22e..a95d875 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -276,11 +276,7 @@ '
↑ '+fmtSpeed(net.tx_bytes_sec||0)+'
'; card.querySelector('.node-time').innerHTML = '
'+(n.last_seen ? new Date(n.last_seen*1000).toLocaleTimeString() : '—')+'
'; } else { - // 网格模式 - var oldCpu = parseFloat(body.getAttribute('data-cpu')||cpuVal); - var oldMem = parseFloat(body.getAttribute('data-mem')||memVal); - body.setAttribute('data-cpu', cpuVal); - body.setAttribute('data-mem', memVal); + // 网格模式 — oldCpu/oldMem 已在上面读取(在setAttribute之前) var hasMetricBar = body.querySelector('.metric-bar'); var isNew = !body.querySelector('.cpu-val') || !hasMetricBar; if (isNew) {