From bf758aa849fd7feb94e5affef2566dbebede913c Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 13:57:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CPU/MEM=E5=9B=BE=E8=A1=A8=E5=AE=BD?= =?UTF-8?q?=E5=BA=A62x=E5=88=86=E8=BE=A8=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sentinel/dashboard.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 0cb435c..a30cc27 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -273,8 +273,9 @@ try { _chartInstances[id] = { cpu: null, mem: null, net: null }; if (typeof MiniChart !== 'undefined') { - _chartInstances[id].cpu = new MiniChart(id+'-cpu', '#7aa2f7'); - _chartInstances[id].mem = new MiniChart(id+'-mem', '#9ece6a'); + var _hires = function(mc){ var orig=mc.resize.bind(mc); mc.resize=function(){ orig(); mc.canvas.width*=2; mc.ctx.scale(2,1); mc.draw(); }; mc.resize(); }; + _chartInstances[id].cpu = new MiniChart(id+'-cpu', '#7aa2f7'); _hires(_chartInstances[id].cpu); + _chartInstances[id].mem = new MiniChart(id+'-mem', '#9ece6a'); _hires(_chartInstances[id].mem); } if (typeof DualLineChart !== 'undefined') { _chartInstances[id].net = new DualLineChart(id+'-net', '#bb9af7', '#c0a8f0');