Add service health checks and dynamic Apps page
Backend polls each registered service's /health endpoint every 30 s via a background asyncio task. GET /api/services exposes the live status snapshot. The Apps page now renders from this endpoint — showing "Unavailable" (dimmed, non-clickable) when a service is registered but its container is unreachable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -224,6 +224,19 @@ export const updateDocumentLimits = (max_pdf_mb: number) =>
|
||||
export const getDocumentLimits = () =>
|
||||
api.get<Record<string, unknown>>("/settings/documents/limits").then((r) => r.data);
|
||||
|
||||
// --- Services ---
|
||||
export interface ServiceStatus {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
healthy: boolean;
|
||||
app_path: string;
|
||||
settings_path: string;
|
||||
}
|
||||
|
||||
export const getServices = () =>
|
||||
api.get<ServiceStatus[]>("/services").then((r) => r.data);
|
||||
|
||||
// --- System Prompts (admin only) ---
|
||||
export interface ServiceSystemPrompt {
|
||||
label: string;
|
||||
|
||||
Reference in New Issue
Block a user