mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 12:14:41 -05:00
Fix #2608
This commit is contained in:
parent
27585d0812
commit
7bb12a7e00
@ -3,6 +3,7 @@ import { useToast } from "vue-toastification";
|
|||||||
import jwtDecode from "jwt-decode";
|
import jwtDecode from "jwt-decode";
|
||||||
import Favico from "favico.js";
|
import Favico from "favico.js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import { DOWN, MAINTENANCE, PENDING, UP } from "../util.ts";
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
let socket;
|
let socket;
|
||||||
@ -669,17 +670,17 @@ export default {
|
|||||||
let beat = this.$root.lastHeartbeatList[monitorID];
|
let beat = this.$root.lastHeartbeatList[monitorID];
|
||||||
let monitor = this.$root.monitorList[monitorID];
|
let monitor = this.$root.monitorList[monitorID];
|
||||||
|
|
||||||
if (monitor && monitor.maintenance) {
|
if (monitor && ! monitor.active) {
|
||||||
result.maintenance++;
|
|
||||||
} else if (monitor && ! monitor.active) {
|
|
||||||
result.pause++;
|
result.pause++;
|
||||||
} else if (beat) {
|
} else if (beat) {
|
||||||
if (beat.status === 1) {
|
if (beat.status === UP) {
|
||||||
result.up++;
|
result.up++;
|
||||||
} else if (beat.status === 0) {
|
} else if (beat.status === DOWN) {
|
||||||
result.down++;
|
result.down++;
|
||||||
} else if (beat.status === 2) {
|
} else if (beat.status === PENDING) {
|
||||||
result.up++;
|
result.up++;
|
||||||
|
} else if (beat.status === MAINTENANCE) {
|
||||||
|
result.maintenance++;
|
||||||
} else {
|
} else {
|
||||||
result.unknown++;
|
result.unknown++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user