From 7fb51f27797d3a7c390af6fb68cc920da1c67aac Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 14:27:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=204x=E5=AE=BD=E5=88=86=E8=BE=A8=E7=8E=87(?= =?UTF-8?q?=E4=BB=85=E5=AE=BD=20=E4=B8=8D=E9=AB=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sentinel/dashboard.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 083689b..80945ce 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -273,7 +273,7 @@ try { _chartInstances[id] = { cpu: null, mem: null, net: null }; if (typeof MiniChart !== 'undefined') { - var _hires = function(mc){ var fn=mc.resize||mc.applyResize; if(!fn)return; var orig=fn.bind(mc); var wrap=function(){ orig(); mc. mc.canvas.width*=2; mc.ctx.scale(2,1); mc.draw(); }; if(mc.resize)mc.resize=wrap; else mc.applyResize=wrap; wrap(); }; + var _hires = function(mc){ var fn=mc.resize||mc.applyResize; if(!fn)return; var orig=fn.bind(mc); var wrap=function(){ orig(); mc. mc.canvas.width*=4; mc.ctx.scale(4,1); mc.draw(); }; if(mc.resize)mc.resize=wrap; else mc.applyResize=wrap; wrap(); }; _chartInstances[id].cpu = new MiniChart(id+'-cpu', '#7aa2f7'); _hires(_chartInstances[id].cpu); _chartInstances[id].mem = new MiniChart(id+'-mem', '#9ece6a'); _hires(_chartInstances[id].mem); } @@ -281,7 +281,7 @@ _chartInstances[id].net = new DualLineChart(id+'-net', '#bb9af7', '#c0a8f0'); (function(dlc){ var orig = dlc.applyResize.bind(dlc); - dlc.applyResize = function(){ orig(); dlc. dlc.canvas.width *= 2; dlc.ctx.scale(2,1); dlc.draw(); }; + dlc.applyResize = function(){ orig(); dlc. dlc.canvas.width *= 4; dlc.ctx.scale(4,1); dlc.draw(); }; dlc.applyResize(); })(_chartInstances[id].net); }