feat(nextcloud-status): Meldung in Tessera, Anleitung und Changelog
- Endpunkt für letzte Übergänge der abonnierten Clouds, globaler Melder im Portalrahmen (Desktop: Windows-Benachrichtigung) - Anleitung für Anwender und Administration, Changelog Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -201,3 +201,36 @@ export async function unsubscribe(id: string): Promise<void> {
|
||||
});
|
||||
if (!res.ok) throw new Error(await readErrorMessage(res, 'Failed to unsubscribe'));
|
||||
}
|
||||
|
||||
/** Ein abgewiesener Aufruf der Meldungsabfrage; `status` ist der HTTP-Status (401, 403 ...). */
|
||||
export class NextcloudRequestError extends Error {
|
||||
public readonly status: number;
|
||||
|
||||
constructor(status: number) {
|
||||
super(`Nextcloud status request failed (${status})`);
|
||||
this.name = 'NextcloudRequestError';
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
||||
/** Ein Uebergang einer abonnierten Cloud (Meldung in Tessera). */
|
||||
export interface NextcloudAlert {
|
||||
instanceId: string;
|
||||
customerName: string;
|
||||
baseUrl: string;
|
||||
kind: 'down' | 'up';
|
||||
/** Rote Grundkennung, nur bei `down` (z. B. 'unreachable'). */
|
||||
reason: string | null;
|
||||
/** ISO-Zeitpunkt des Uebergangs. */
|
||||
changedAt: string;
|
||||
}
|
||||
|
||||
/** GET /modules/nextcloud-status/alerts — letzte Uebergaenge der Clouds mit eingeschalteter Glocke. */
|
||||
export async function listAlerts(): Promise<{ alerts: NextcloudAlert[] }> {
|
||||
const res = await fetch(`${API_URL}/modules/nextcloud-status/alerts`, {
|
||||
credentials: 'include',
|
||||
cache: 'no-store',
|
||||
});
|
||||
if (!res.ok) throw new NextcloudRequestError(res.status);
|
||||
return res.json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user