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 --- backend/internal/api/router.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backend/internal/api/router.go') diff --git a/backend/internal/api/router.go b/backend/internal/api/router.go index 9a18cc5..8188b25 100644 --- a/backend/internal/api/router.go +++ b/backend/internal/api/router.go @@ -23,6 +23,11 @@ func NewRouter(h *Handler, stream *StreamHandler, auth *AuthHandler) http.Handle mux.HandleFunc("GET /api/active-maintenance", h.GetActiveMaintenance) + mux.HandleFunc("GET /api/maintenances", h.ListMaintenances) + mux.HandleFunc("POST /api/maintenances", h.CreateMaintenance) + mux.HandleFunc("PUT /api/maintenances/{id}", h.UpdateMaintenance) + mux.HandleFunc("DELETE /api/maintenances/{id}", h.DeleteMaintenance) + mux.Handle("GET /api/stream", stream) return corsMiddleware(auth.Middleware(mux)) -- cgit v1.2.3