aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/routes/status
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/routes/status')
-rw-r--r--frontend/src/routes/status/[id]/+page.svelte2
-rw-r--r--frontend/src/routes/status/[id]/+page.ts3
2 files changed, 3 insertions, 2 deletions
diff --git a/frontend/src/routes/status/[id]/+page.svelte b/frontend/src/routes/status/[id]/+page.svelte
index afc59a2..0701eeb 100644
--- a/frontend/src/routes/status/[id]/+page.svelte
+++ b/frontend/src/routes/status/[id]/+page.svelte
@@ -187,7 +187,7 @@
</span>
</div>
{:else}
- <svg class="h-full w-full" viewBox="0 0 {chartW} {chartH}" preserveAspectRatio="none">
+ <svg class="h-full w-full">
{#each yTicks as tick}
<line
x1={chartPad.l} y1={tick.y} x2={chartW - chartPad.r} y2={tick.y}
diff --git a/frontend/src/routes/status/[id]/+page.ts b/frontend/src/routes/status/[id]/+page.ts
index 4351aae..1b91c67 100644
--- a/frontend/src/routes/status/[id]/+page.ts
+++ b/frontend/src/routes/status/[id]/+page.ts
@@ -11,7 +11,8 @@ export const load: PageLoad = async ({ params, fetch }) => {
const services = servicesRes?.ok ? await servicesRes.json() : [];
const svc = services.find((s: any) => s.id === Number(id));
- const history = historyRes?.ok ? await historyRes.json() : [];
+ const historyJson = historyRes?.ok ? await historyRes.json() : [];
+ const history = Array.isArray(historyJson) ? historyJson : (historyJson.data ?? []);
const stats = statsRes?.ok ? await statsRes.json() : null;
return {