diff options
| author | Johann150 <johann.galle@protonmail.com> | 2022-05-25 10:13:46 +0200 |
|---|---|---|
| committer | Johann150 <johann.galle@protonmail.com> | 2022-05-25 10:13:46 +0200 |
| commit | a7be9be43d0c4ab387e65c77b09e58e5eef33f5e (patch) | |
| tree | 0b97baa2016fa5c02bcde22fa60391685ac68336 | |
| parent | refactor: temporary files (#8713) (diff) | |
| download | sharkey-a7be9be43d0c4ab387e65c77b09e58e5eef33f5e.tar.gz sharkey-a7be9be43d0c4ab387e65c77b09e58e5eef33f5e.tar.bz2 sharkey-a7be9be43d0c4ab387e65c77b09e58e5eef33f5e.zip | |
fix: server metrics widget
| -rw-r--r-- | packages/client/src/widgets/server-metric/cpu-mem.vue | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/client/src/widgets/server-metric/cpu-mem.vue b/packages/client/src/widgets/server-metric/cpu-mem.vue index 7cbc7fa15f..00c3a10c9b 100644 --- a/packages/client/src/widgets/server-metric/cpu-mem.vue +++ b/packages/client/src/widgets/server-metric/cpu-mem.vue @@ -121,10 +121,10 @@ function onStats(connStats) { cpuPolygonPoints = `${viewBoxX - (stats.length - 1)},${viewBoxY} ${cpuPolylinePoints} ${viewBoxX},${viewBoxY}`; memPolygonPoints = `${viewBoxX - (stats.length - 1)},${viewBoxY} ${memPolylinePoints} ${viewBoxX},${viewBoxY}`; - cpuHeadX = cpuPolylinePoints[cpuPolylinePoints.length - 1][0]; - cpuHeadY = cpuPolylinePoints[cpuPolylinePoints.length - 1][1]; - memHeadX = memPolylinePoints[memPolylinePoints.length - 1][0]; - memHeadY = memPolylinePoints[memPolylinePoints.length - 1][1]; + cpuHeadX = cpuPolylinePointsStats[cpuPolylinePointsStats.length - 1][0]; + cpuHeadY = cpuPolylinePointsStats[cpuPolylinePointsStats.length - 1][1]; + memHeadX = memPolylinePointsStats[memPolylinePointsStats.length - 1][0]; + memHeadY = memPolylinePointsStats[memPolylinePointsStats.length - 1][1]; cpuP = (connStats.cpu * 100).toFixed(0); memP = (connStats.mem.active / props.meta.mem.total * 100).toFixed(0); |