mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 20:20:59 +08:00
add ping and fix uptime
This commit is contained in:
@@ -48,7 +48,7 @@ export default {
|
||||
let frames = 12;
|
||||
let step = Math.floor(diff / frames);
|
||||
|
||||
if (! this.isNum || (diff > 0 && step < 1) || (diff < 0 && step > 1) || diff === 0) {
|
||||
if (isNaN(step) || ! this.isNum || (diff > 0 && step < 1) || (diff < 0 && step > 1) || diff === 0) {
|
||||
// Lazy to NOT this condition, hahaha.
|
||||
} else {
|
||||
for (let i = 1; i < frames; i++) {
|
||||
|
@@ -18,7 +18,7 @@ export default {
|
||||
|
||||
let key = this.monitor.id + "_" + this.type;
|
||||
|
||||
if (this.$root.uptimeList[key]) {
|
||||
if (this.$root.uptimeList[key] !== undefined) {
|
||||
return Math.round(this.$root.uptimeList[key] * 10000) / 100 + "%";
|
||||
} else {
|
||||
return "N/A"
|
||||
|
Reference in New Issue
Block a user