From 27a191b54ce97da5099d0eef9a99613c5cd0496e Mon Sep 17 00:00:00 2001 From: Bobban Rydh Date: Mon, 12 Oct 2026 00:04:46 +0200 Subject: [PATCH] Show what Uptime Kuma reported for each maintenance window in the sync result Each window in the "Sync schedule" result now lists how many monitors it covers and the time slots Kuma sent for it, so an empty result can be traced to missing monitors, missing slots or monitors that match no server. Co-Authored-By: Claude Sonnet 5.5 --- server/src/services/kumaMaintenanceSync.ts | 5 +++++ web/src/api/client.ts | 2 ++ web/src/pages/Maintenance.tsx | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/server/src/services/kumaMaintenanceSync.ts b/server/src/services/kumaMaintenanceSync.ts index a22dd75..a1e33be 100644 --- a/server/src/services/kumaMaintenanceSync.ts +++ b/server/src/services/kumaMaintenanceSync.ts @@ -101,6 +101,9 @@ export interface MaintenanceSyncSummary { title: string; strategy: string; status: string; + /** How many monitors the window covers in Uptime Kuma, and the time slots Kuma reported for it (running and next). */ + monitorCount: number; + slots: { start: string; end: string }[]; /** Windows that apply here, by server name. */ servers: string[]; /** Monitors the window covers that match no server. */ @@ -167,6 +170,8 @@ export function desiredWindows( title: m.title, strategy: m.strategy, status: m.status, + monitorCount: m.monitorIds.length, + slots: m.timeslots.slice(0, 3), servers: [...matched.values()].sort(), unmatched, note, diff --git a/web/src/api/client.ts b/web/src/api/client.ts index 38ffe81..dc3bae5 100644 --- a/web/src/api/client.ts +++ b/web/src/api/client.ts @@ -781,6 +781,8 @@ export interface UptimeKumaSyncResult { title: string; strategy: string; status: string; + monitorCount: number; + slots: { start: string; end: string }[]; servers: string[]; unmatched: string[]; /** Why it produced no window, when it did not. */ diff --git a/web/src/pages/Maintenance.tsx b/web/src/pages/Maintenance.tsx index dfa404b..072d1da 100644 --- a/web/src/pages/Maintenance.tsx +++ b/web/src/pages/Maintenance.tsx @@ -298,6 +298,12 @@ export default function Maintenance({ user }: { user: CurrentUser }) { {m.servers.length > 0 ? ` → ${m.servers.join(", ")}` : m.note ? ` — nothing to schedule: ${m.note}` : ""} {m.unmatched.length > 0 && · no server for {m.unmatched.join(", ")}} +
+ Covers {m.monitorCount} monitor{m.monitorCount === 1 ? "" : "s"} in Uptime Kuma ·{" "} + {m.slots.length === 0 + ? "Uptime Kuma gave no time slot" + : m.slots.map((s) => `${formatDateTime(new Date(s.start))} – ${formatDateTime(new Date(s.end))}`).join("; ")} +
))}