From 257f92f746babace67114368533c1bbacccbb764 Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 12:20:17 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20pollNodes=E5=8A=A0console.log=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sentinel/dashboard.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 7c3a89e..27516a6 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -371,9 +371,15 @@ function bar(v) { return v < 60 ? 'bar-green' : (v < 85 ? 'bar-yellow' : 'bar-re function esc(s) { return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); } function pollNodes() { - fetch("/sentinel/api/nodes").then(function(r){return r.json()}).then(function(d){ + console.log("pollNodes: fetching..."); + fetch("/sentinel/api/nodes").then(function(r){ + console.log("pollNodes: status="+r.status); + return r.json(); + }).then(function(d){ + console.log("pollNodes: got "+ (d.nodes ? d.nodes.length : 0) +" nodes"); renderNodes(d.nodes || []); }).catch(function(e){ + console.error("pollNodes error:", e); var grid = document.getElementById("sentinel-grid"); if (grid && _firstRender) { grid.innerHTML = '
连接失败 — 检查节点配置
';