mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 01:04:05 +00:00
Feat: Save and restore chart period
This commit is contained in:
parent
fb0064082e
commit
1417b6eacf
1 changed files with 7 additions and 0 deletions
|
@ -228,6 +228,7 @@ export default {
|
||||||
toast.error(res.msg);
|
toast.error(res.msg);
|
||||||
} else {
|
} else {
|
||||||
this.heartbeatList = res.data;
|
this.heartbeatList = res.data;
|
||||||
|
this.$root.storage()[`chart-period-${this.monitorId}`] = newPeriod;
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
@ -248,6 +249,12 @@ export default {
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Load chart period from storage if saved
|
||||||
|
let period = this.$root.storage()[`chart-period-${this.monitorId}`];
|
||||||
|
if (period != null) {
|
||||||
|
this.chartPeriodHrs = period;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue