mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-28 01:04:05 +00:00
Fix: Limit saved period & clear when set to recent
This commit is contained in:
parent
1417b6eacf
commit
6f99d7577b
1 changed files with 2 additions and 1 deletions
|
@ -220,6 +220,7 @@ export default {
|
||||||
if (newPeriod == "0") {
|
if (newPeriod == "0") {
|
||||||
newPeriod = null;
|
newPeriod = null;
|
||||||
this.heartbeatList = null;
|
this.heartbeatList = null;
|
||||||
|
this.$root.storage().removeItem(`chart-period-${this.monitorId}`);
|
||||||
} else {
|
} else {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
||||||
|
@ -253,7 +254,7 @@ export default {
|
||||||
// Load chart period from storage if saved
|
// Load chart period from storage if saved
|
||||||
let period = this.$root.storage()[`chart-period-${this.monitorId}`];
|
let period = this.$root.storage()[`chart-period-${this.monitorId}`];
|
||||||
if (period != null) {
|
if (period != null) {
|
||||||
this.chartPeriodHrs = period;
|
this.chartPeriodHrs = Math.min(period, 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue