diff --git a/src/components/PingChart.vue b/src/components/PingChart.vue index 60b0d3c9c..3dcc74fa7 100644 --- a/src/components/PingChart.vue +++ b/src/components/PingChart.vue @@ -182,7 +182,7 @@ export default { // eslint-disable-next-line eqeqeq if (newPeriod == "0") { this.heartbeatList = null; - this.$root.storage().removeItem(`chart-period-${this.monitorId}`); + this.$root.storage()["chart-period"] = newPeriod; } else { this.loading = true; @@ -199,7 +199,7 @@ export default { this.$root.toastError(res.msg); } else { this.chartRawData = res.data; - this.$root.storage()[`chart-period-${this.monitorId}`] = newPeriod; + this.$root.storage()["chart-period"] = newPeriod; } this.loading = false; }); @@ -216,7 +216,7 @@ export default { }, created() { // Load chart period from storage if saved - let period = this.$root.storage()[`chart-period-${this.monitorId}`]; + let period = this.$root.storage()["chart-period"]; if (period != null) { // Has this ever been not a string? if (typeof period !== "string") { @@ -224,7 +224,7 @@ export default { } this.chartPeriodHrs = period; } else { - this.chartPeriodHrs = "24"; + this.chartPeriodHrs = "0"; } }, beforeUnmount() {