From d186a989b6808ff39fcd43a9f0b478aebc4aa346 Mon Sep 17 00:00:00 2001 From: zwlucas Date: Fri, 29 May 2026 17:21:48 -0300 Subject: feat: enhance maintenance management and heartbeat history features - Updated Store interface to include methods for managing maintenances. - Modified API functions to support pagination for heartbeat history and added CRUD operations for maintenances. - Enhanced types to include paginated responses and initial log entries. - Implemented maintenance management UI in the admin panel with create, edit, and delete functionalities. - Updated service detail page to display paginated heartbeat history and improved chart rendering. - Refactored status page to accommodate new data structures and ensure consistent data handling. Signed-off-by: Lucas Faria Mendes --- frontend/src/routes/status/[id]/+page.svelte | 2 +- frontend/src/routes/status/[id]/+page.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'frontend/src/routes/status') 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 @@ {:else} - + {#each yTicks as tick} { 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 { -- cgit v1.2.3