|
|
@ -627,28 +627,28 @@ export default {
|
|
|
|
for (let monitorID in this.lastHeartbeatList) {
|
|
|
|
for (let monitorID in this.lastHeartbeatList) {
|
|
|
|
let lastHeartBeat = this.lastHeartbeatList[monitorID];
|
|
|
|
let lastHeartBeat = this.lastHeartbeatList[monitorID];
|
|
|
|
|
|
|
|
|
|
|
|
if (this.monitorList[monitorID] && this.monitorList[monitorID].maintenance) {
|
|
|
|
if (! lastHeartBeat) {
|
|
|
|
result[monitorID] = {
|
|
|
|
|
|
|
|
text: this.$t("statusMaintenance"),
|
|
|
|
|
|
|
|
color: "maintenance",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} else if (! lastHeartBeat) {
|
|
|
|
|
|
|
|
result[monitorID] = unknown;
|
|
|
|
result[monitorID] = unknown;
|
|
|
|
} else if (lastHeartBeat.status === 1) {
|
|
|
|
} else if (lastHeartBeat.status === UP) {
|
|
|
|
result[monitorID] = {
|
|
|
|
result[monitorID] = {
|
|
|
|
text: this.$t("Up"),
|
|
|
|
text: this.$t("Up"),
|
|
|
|
color: "primary",
|
|
|
|
color: "primary",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
} else if (lastHeartBeat.status === 0) {
|
|
|
|
} else if (lastHeartBeat.status === DOWN) {
|
|
|
|
result[monitorID] = {
|
|
|
|
result[monitorID] = {
|
|
|
|
text: this.$t("Down"),
|
|
|
|
text: this.$t("Down"),
|
|
|
|
color: "danger",
|
|
|
|
color: "danger",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
} else if (lastHeartBeat.status === 2) {
|
|
|
|
} else if (lastHeartBeat.status === PENDING) {
|
|
|
|
result[monitorID] = {
|
|
|
|
result[monitorID] = {
|
|
|
|
text: this.$t("Pending"),
|
|
|
|
text: this.$t("Pending"),
|
|
|
|
color: "warning",
|
|
|
|
color: "warning",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
} else if (lastHeartBeat.status === MAINTENANCE) {
|
|
|
|
|
|
|
|
result[monitorID] = {
|
|
|
|
|
|
|
|
text: this.$t("statusMaintenance"),
|
|
|
|
|
|
|
|
color: "maintenance",
|
|
|
|
|
|
|
|
};
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
result[monitorID] = unknown;
|
|
|
|
result[monitorID] = unknown;
|
|
|
|
}
|
|
|
|
}
|
|
|
|