Add custom homelab dashboard stack

This commit is contained in:
2026-04-05 13:43:03 +02:00
parent 450a04a7d3
commit 89b9173c25
38 changed files with 3539 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
const DEFAULT_HEADERS = {
Accept: "application/json",
};
async function fetchJson(path) {
const response = await fetch(path, {
headers: DEFAULT_HEADERS,
cache: "no-store",
});
if (!response.ok) {
throw new Error(`Request failed for ${path}: ${response.status}`);
}
return response.json();
}
export async function fetchDashboardData() {
const [overview, system, services, storage] = await Promise.all([
fetchJson("/api/overview"),
fetchJson("/api/system"),
fetchJson("/api/services"),
fetchJson("/api/storage"),
]);
return { overview, system, services, storage };
}