diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2021-02-27 11:18:56 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2021-02-27 11:18:56 +0900 |
| commit | 34fef37e54a5dede325d29077c3b031dbe2e4c64 (patch) | |
| tree | b4019ffa6b61febb33a4c52b95943862dc98ba6f /src/client/widgets | |
| parent | perf: use overflow: clip instead of hidden (diff) | |
| parent | Merge pull request #7268 from syuilo/dependabot/npm_and_yarn/nodemailer-6.5.0 (diff) | |
| download | sharkey-34fef37e54a5dede325d29077c3b031dbe2e4c64.tar.gz sharkey-34fef37e54a5dede325d29077c3b031dbe2e4c64.tar.bz2 sharkey-34fef37e54a5dede325d29077c3b031dbe2e4c64.zip | |
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/client/widgets')
| -rw-r--r-- | src/client/widgets/server-metric/cpu-mem.vue | 4 | ||||
| -rw-r--r-- | src/client/widgets/server-metric/mem.vue | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/client/widgets/server-metric/cpu-mem.vue b/src/client/widgets/server-metric/cpu-mem.vue index f1c31d7cdf..ad9e6a8b0f 100644 --- a/src/client/widgets/server-metric/cpu-mem.vue +++ b/src/client/widgets/server-metric/cpu-mem.vue @@ -120,7 +120,7 @@ export default defineComponent({ if (this.stats.length > 50) this.stats.shift(); const cpuPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - s.cpu) * this.viewBoxY]); - const memPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - (s.mem.used / this.meta.mem.total)) * this.viewBoxY]); + const memPolylinePoints = this.stats.map((s, i) => [this.viewBoxX - ((this.stats.length - 1) - i), (1 - (s.mem.active / this.meta.mem.total)) * this.viewBoxY]); this.cpuPolylinePoints = cpuPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' '); this.memPolylinePoints = memPolylinePoints.map(xy => `${xy[0]},${xy[1]}`).join(' '); @@ -133,7 +133,7 @@ export default defineComponent({ this.memHeadY = memPolylinePoints[memPolylinePoints.length - 1][1]; this.cpuP = (stats.cpu * 100).toFixed(0); - this.memP = (stats.mem.used / this.meta.mem.total * 100).toFixed(0); + this.memP = (stats.mem.active / this.meta.mem.total * 100).toFixed(0); }, onStatsLog(statsLog) { for (const stats of [...statsLog].reverse()) { diff --git a/src/client/widgets/server-metric/mem.vue b/src/client/widgets/server-metric/mem.vue index eab23c1be2..83aa71aa09 100644 --- a/src/client/widgets/server-metric/mem.vue +++ b/src/client/widgets/server-metric/mem.vue @@ -45,10 +45,10 @@ export default defineComponent({ }, methods: { onStats(stats) { - this.usage = stats.mem.used / this.meta.mem.total; + this.usage = stats.mem.active / this.meta.mem.total; this.total = this.meta.mem.total; - this.used = stats.mem.used; - this.free = this.meta.mem.total - stats.mem.used; + this.used = stats.mem.active; + this.free = this.meta.mem.total - stats.mem.active; }, bytes } |