From ac8817ef3429977dfdb06b0aa29c838a65ac8bb2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 9 Nov 2018 18:38:10 +0900 Subject: [PATCH] [Client] Fix bug --- src/client/app/admin/views/charts.vue | 4 ++++ src/client/app/admin/views/cpu-memory.vue | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/client/app/admin/views/charts.vue b/src/client/app/admin/views/charts.vue index f70e7c207e..13e8b3671e 100644 --- a/src/client/app/admin/views/charts.vue +++ b/src/client/app/admin/views/charts.vue @@ -140,6 +140,10 @@ export default Vue.extend({ this.render(); }, + beforeDestroy() { + this.chartInstance.destroy(); + }, + methods: { setSrc(src) { this.src = src; diff --git a/src/client/app/admin/views/cpu-memory.vue b/src/client/app/admin/views/cpu-memory.vue index 3200c660e6..a111dfe32d 100644 --- a/src/client/app/admin/views/cpu-memory.vue +++ b/src/client/app/admin/views/cpu-memory.vue @@ -117,6 +117,9 @@ export default Vue.extend({ beforeDestroy() { this.connection.off('stats', this.onStats); this.connection.off('statsLog', this.onStatsLog); + + this.cpuChart.destroy(); + this.memChart.destroy(); }, methods: {