From 11e9eee09d45996d476168d8c646962eb6104bd1 Mon Sep 17 00:00:00 2001 From: OidaTiftla Date: Sun, 23 Jan 2022 17:48:09 +0100 Subject: [PATCH] Change seconds to minutes --- server/model/monitor.js | 2 +- src/languages/en.js | 1 + src/pages/EditMonitor.vue | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index eaba61ad..f4803355 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -403,7 +403,7 @@ class Monitor extends BeanModel { bean.important = false; if (bean.status === DOWN && this.resendInterval > 0) { - timeSinceLastNotified = dayjs().valueOf() - (bean.lastNotifiedTime || 0); + timeSinceLastNotified = (dayjs().valueOf() - (bean.lastNotifiedTime || 0)) / 60; // divide by 60 to convert from seconds to minutes if (timeSinceLastNotified >= this.resendInterval) { // Send notification again, because we are still DOWN debug(`[${this.name}] sendNotification`); diff --git a/src/languages/en.js b/src/languages/en.js index 47513466..21e215f7 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -2,6 +2,7 @@ export default { languageName: "English", checkEverySecond: "Check every {0} seconds", retryCheckEverySecond: "Retry every {0} seconds", + resendEveryMinute: "Resend every {0} minutes if DOWN", retriesDescription: "Maximum retries before the service is marked as down and a notification is sent", ignoreTLSError: "Ignore TLS/SSL error for HTTPS websites", upsideDownModeDescription: "Flip the status upside down. If the service is reachable, it is DOWN.", diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index b95c1098..3b4cbcf1 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -140,7 +140,7 @@
@@ -439,6 +439,7 @@ export default { method: "GET", interval: 60, retryInterval: this.interval, + resendInterval: 0, maxretries: 0, notificationIDList: {}, ignoreTls: false,