All checks were successful
deploy / deploy (push) Successful in 1m5s
Proof: Include the full operator-dashboard frontend source tree so the deployment image can build and serve the dashboard UI that consumes runtime health severity. Assumptions: The current static dashboard source tree in the worktree is the intended frontend for this turn and belongs with the deployed operator-dashboard backend. Still fake: External alert receiver remains unconfigured; this commit only resolves the dashboard asset source gap in the deploy.
11 lines
292 B
JavaScript
11 lines
292 B
JavaScript
export async function fetchJson(url, options = {}) {
|
|
const response = await fetch(url, options);
|
|
const text = await response.text();
|
|
const data = text ? JSON.parse(text) : null;
|
|
|
|
if (!response.ok) {
|
|
throw new Error(data?.error || `HTTP ${response.status}`);
|
|
}
|
|
|
|
return data;
|
|
}
|