chore: sync GovOPlaN module split state
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import { apiFetch, type ApiSettings } from "@govoplan/core-webui";
|
||||
|
||||
export type OpsCheck = {
|
||||
id: string;
|
||||
label: string;
|
||||
state: "ok" | "warning" | "error" | string;
|
||||
detail: string;
|
||||
readiness_critical?: boolean;
|
||||
};
|
||||
|
||||
export type OpsDeploymentProfile = {
|
||||
id: string;
|
||||
name: string;
|
||||
current: boolean;
|
||||
components: string[];
|
||||
fit: string;
|
||||
};
|
||||
|
||||
export type OpsSizingAssumption = {
|
||||
area: string;
|
||||
baseline: string;
|
||||
scale_trigger: string;
|
||||
operator_note: string;
|
||||
};
|
||||
|
||||
export type OpsStatus = {
|
||||
summary: {
|
||||
app_env: string;
|
||||
active_profile: string;
|
||||
module_count: number;
|
||||
celery_enabled: boolean;
|
||||
celery_queues: string[];
|
||||
redis_url: string;
|
||||
maintenance_mode: {
|
||||
enabled: boolean;
|
||||
message?: string | null;
|
||||
};
|
||||
database_url: string;
|
||||
file_storage_backend: string;
|
||||
};
|
||||
readiness: {
|
||||
ready: boolean;
|
||||
profile: string;
|
||||
blockers: Array<{
|
||||
id: string;
|
||||
label: string;
|
||||
state: string;
|
||||
detail: string;
|
||||
}>;
|
||||
};
|
||||
checks: OpsCheck[];
|
||||
deployment_profiles: OpsDeploymentProfile[];
|
||||
sizing: OpsSizingAssumption[];
|
||||
};
|
||||
|
||||
export function fetchOpsStatus(settings: ApiSettings): Promise<OpsStatus> {
|
||||
return apiFetch(settings, "/api/v1/ops/status");
|
||||
}
|
||||
Reference in New Issue
Block a user