From 6b5e179bb064d9e20bc957f7fec09c6054727c7a Mon Sep 17 00:00:00 2001 From: Janne Nowak Date: Wed, 17 May 2023 19:02:34 +0200 Subject: [PATCH] linting --- server/model/monitor.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index cfa006340..f9a77d067 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -575,16 +575,14 @@ class Monitor extends BeanModel { log.debug("monitor", `[${this.name}] Axios Request`); let res = await axios.request(options); - if (res.data.State.Health && res.data.State.Health.Status !== "healthy"){ + if (res.data.State.Health && res.data.State.Health.Status !== "healthy") { bean.status = PENDING; bean.msg = res.data.State.Health.Status; log.debug("monitor", `[${this.name}] Monitor is ${res.data.State.Health.Status}`); - } - else if (res.data.State.Running) { + } else if (res.data.State.Running) { bean.status = UP; - bean.msg = res.data.State.Health? res.data.State.Health.Status:res.data.State.Status; - } - else { + bean.msg = res.data.State.Health ? res.data.State.Health.Status : res.data.State.Status; + } else { throw Error("Container State is " + res.data.State.Status); } } else if (this.type === "mqtt") {