diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 67ca6f3dd..9e9cb838d 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -776,7 +776,7 @@
-
+
@@ -787,9 +787,9 @@ {{ $t("Maintenance") }}
-
+
@@ -2035,15 +2035,18 @@ message HealthCheckResponse { } }, + getStatusCode(status) { + const statusMap = { + "up": 1, + "down": 0, + "pending": 2, + "maintenance": 3 + }; + return statusMap[status] ?? 2; + }, + setManualStatus(status) { this.monitor.manual_status = this.getStatusCode(status); - this.$root.getSocket().emit("editMonitor", this.monitor, (res) => { - if (res.ok) { - this.toast.success(this.$t("Success")); - } else { - this.toast.error(res.msg); - } - }); }, }, };