Make the Uptime Kuma maintenance import say what it found

The import route returned its errors as {error} while the page reads
{message}, so a wrong API key or an unreachable Uptime Kuma showed as raw
JSON. Every failure now carries a readable message. An empty result now
says how many monitors were read and that only maintenance active right
now can be imported, and a disabled integration is explained instead of
leaving a greyed-out button. Adds route tests against a stand-in Uptime Kuma.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-11 23:26:32 +02:00
1 parent 3daec601fd
commit 5e416b0273
4 files changed
+134 -7

No files matched your search

+2
View File
@@ -777,6 +777,8 @@ export interface UptimeKumaImportResult {
imported: { serverId: number; serverName: string; monitorName: string; extended: boolean }[];
unmatched: string[];
monitorsInMaintenance: number;
/** How many monitors Uptime Kuma reported in all, so "nothing in maintenance" can be told apart from "nothing read". */
monitorsChecked: number;
}
export interface PbsFailedSnapshot {