From 6b19e54c23d100d10ccc643f8eadeaafdc0b67e0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 27 Jul 2018 18:18:05 +0900 Subject: Fix bug --- src/client/app/common/views/widgets/server.cpu-memory.vue | 1 - src/client/app/common/views/widgets/server.memory.vue | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/client') diff --git a/src/client/app/common/views/widgets/server.cpu-memory.vue b/src/client/app/common/views/widgets/server.cpu-memory.vue index da6b9f799f..00c42bf73b 100644 --- a/src/client/app/common/views/widgets/server.cpu-memory.vue +++ b/src/client/app/common/views/widgets/server.cpu-memory.vue @@ -102,7 +102,6 @@ export default Vue.extend({ }, methods: { onStats(stats) { - stats.mem.used = stats.mem.total - stats.mem.free; this.stats.push(stats); if (this.stats.length > 50) this.stats.shift(); diff --git a/src/client/app/common/views/widgets/server.memory.vue b/src/client/app/common/views/widgets/server.memory.vue index 9212f2271f..8a60621343 100644 --- a/src/client/app/common/views/widgets/server.memory.vue +++ b/src/client/app/common/views/widgets/server.memory.vue @@ -35,7 +35,7 @@ export default Vue.extend({ }, methods: { onStats(stats) { - stats.mem.used = stats.mem.total - stats.mem.free; + stats.mem.free = stats.mem.total - stats.mem.used; this.usage = stats.mem.used / stats.mem.total; this.total = stats.mem.total; this.used = stats.mem.used; -- cgit v1.2.3-freya