From 93665312251c05be266d76c1a08bbcbe8c2711f9 Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 13:54:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20var=20mc=E5=A3=B0=E6=98=8E=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=E8=B5=8B=E5=80=BC=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/sentinel/dashboard.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/sentinel/dashboard.html b/plugins/sentinel/dashboard.html index 9cf9dd6..d63ae5f 100644 --- a/plugins/sentinel/dashboard.html +++ b/plugins/sentinel/dashboard.html @@ -273,10 +273,12 @@ try { _chartInstances[id] = { cpu: null, mem: null, net: null }; if (typeof MiniChart !== 'undefined') { - _chartInstances[id].cpu = var mc = new MiniChart(id+'-cpu', '#7aa2f7'); + var mc = new MiniChart(id+'-cpu', '#7aa2f7'); + _chartInstances[id].cpu = mc; mc._origResize = mc.resize; mc.resize = function(){ this._origResize(); this.canvas.width = this.canvas.width * 2; this.canvas.height = 120; this.ctx.scale(2,2); this.draw(); }; mc.resize(); + _chartInstances[id].mem = mm; _chartInstances[id].mem = var mm = new MiniChart(id+'-mem', '#9ece6a'); mm._origResize = mm.resize; mm.resize = function(){ this._origResize(); this.canvas.width = this.canvas.width * 2; this.canvas.height = 120; this.ctx.scale(2,2); this.draw(); };