LOT 1 - Optimizare script build -Instalare mono comanda
This commit is contained in:
parent
5380c3fc63
commit
42ff22bf85
127 changed files with 16163 additions and 532 deletions
|
|
@ -76,9 +76,15 @@ export default function Settings() {
|
|||
});
|
||||
const health = useQuery({
|
||||
queryKey: ['settings', 'health'],
|
||||
// Dashboard liveness probe lives at root /health (next to /ready), not
|
||||
// /api/health — the latter returns 404 and shows "unknown" in the UI.
|
||||
queryFn: () => apiGet<HealthResponse>('/health'),
|
||||
// Dashboard liveness probe lives at the ORIGIN root /health (next to
|
||||
// /ready). apiGet() would prepend BASE_PATH (/admin-ai/health), which the
|
||||
// SPA static fallback answers with index.html → JSON parse yields no
|
||||
// `status` → "unknown". Fetch the absolute root path directly instead.
|
||||
queryFn: async (): Promise<HealthResponse> => {
|
||||
const res = await fetch('/health', { headers: { Accept: 'application/json' } });
|
||||
if (!res.ok) throw new Error(`health ${res.status}`);
|
||||
return res.json();
|
||||
},
|
||||
refetchInterval: 30_000,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue