From f1cb00d8767ea9238029a2145d786b9ee2febe68 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 19:23:25 +0000 Subject: [PATCH 1/2] [autofix.ci] apply automated fixes --- server/model/monitor.js | 5 ++++- server/notification-providers/discord.js | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 0f1cc18da..39e36f6fd 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1538,7 +1538,10 @@ class Monitor extends BeanModel { } catch (error) { // If we can't calculate downtime, just continue without it // Silently fail to avoid disrupting notification sending - log.debug("monitor", `[${monitor.name}] Could not calculate downtime information: ${error.message}`); + log.debug( + "monitor", + `[${monitor.name}] Could not calculate downtime information: ${error.message}` + ); } } diff --git a/server/notification-providers/discord.js b/server/notification-providers/discord.js index 3d5dcaa5f..c4aeb1708 100644 --- a/server/notification-providers/discord.js +++ b/server/notification-providers/discord.js @@ -121,16 +121,16 @@ class Discord extends NotificationProvider { let wentOfflineFormatted = null; if (heartbeatJSON["lastDownTime"]) { const wentOfflineTimestamp = Math.floor(new Date(heartbeatJSON["lastDownTime"]).getTime() / 1000); - wentOfflineFormatted = ``; + wentOfflineFormatted = ``; // Calculate the actual duration between went offline and back online const durationSeconds = backOnlineTimestamp - wentOfflineTimestamp; - + // Format duration as human-readable string (e.g., "1h 23m", "45m 30s") const hours = Math.floor(durationSeconds / 3600); const minutes = Math.floor((durationSeconds % 3600) / 60); const seconds = durationSeconds % 60; - + const durationParts = []; if (hours > 0) { durationParts.push(`${hours}h`); @@ -142,7 +142,7 @@ class Discord extends NotificationProvider { // Only show seconds if less than an hour durationParts.push(`${seconds}s`); } - + downtimeDuration = durationParts.length > 0 ? durationParts.join(" ") : "0s"; } From f470b0116811062fd0250be0a47eb897c8823355 Mon Sep 17 00:00:00 2001 From: Ian Macabulos Date: Fri, 16 Jan 2026 12:47:04 +0800 Subject: [PATCH 2/2] fix: clairify the helptext that markdown is supported with a warning about HTML indentation (#6747) --- src/lang/en.json | 2 +- src/pages/StatusPage.vue | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index ea1ea35a8..4c8ebffa8 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -39,7 +39,7 @@ "General Monitor Type": "General Monitor Type", "Passive Monitor Type": "Passive Monitor Type", "Specific Monitor Type": "Specific Monitor Type", - "markdownSupported": "Markdown syntax supported", + "markdownSupported": "Markdown syntax supported. If using HTML, avoid leading spaces to prevent formatting issues.", "pauseDashboardHome": "Pause", "Pause": "Pause", "Name": "Name", diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index 1de5c5063..db9fbfb89 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -25,9 +25,7 @@ class="form-control" data-testid="description-input" > -
- {{ $t("markdownSupported") }} -
+
{{ $t("markdownSupported") }}
@@ -39,9 +37,7 @@ class="form-control" data-testid="footer-text-input" > -
- {{ $t("markdownSupported") }} -
+
{{ $t("markdownSupported") }}