pull/2622/head
Louis Lam 2 years ago
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…
Cancel
Save