diff options
| author | zwlucas <lucas.fariamo08@gmail.com> | 2026-05-29 20:21:48 +0000 |
|---|---|---|
| committer | zwlucas <lucas.fariamo08@gmail.com> | 2026-05-29 20:21:48 +0000 |
| commit | d186a989b6808ff39fcd43a9f0b478aebc4aa346 (patch) | |
| tree | abf32684ea56e6066d8584e0378227ffc397ace2 /backend/internal/store/store.go | |
| parent | 6cc0bfd1d79074df790272b8091b1f0226d14283 (diff) | |
| download | yaum-d186a989b6808ff39fcd43a9f0b478aebc4aa346.tar.gz yaum-d186a989b6808ff39fcd43a9f0b478aebc4aa346.zip | |
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 <lucas.fariamo08@gmail.com>
Diffstat (limited to 'backend/internal/store/store.go')
| -rw-r--r-- | backend/internal/store/store.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/internal/store/store.go b/backend/internal/store/store.go index e5e05f6..2c34b1c 100644 --- a/backend/internal/store/store.go +++ b/backend/internal/store/store.go @@ -15,9 +15,14 @@ type Store interface { ToggleService(int) (*model.Service, error) DeleteService(int) error AddHeartbeat(model.Heartbeat) error - GetHistory(int, int) ([]model.Heartbeat, error) + GetHistory(int, int, int) ([]model.Heartbeat, error) + CountHeartbeats(int) (int, error) GetLastHeartbeat(int) (*model.Heartbeat, error) GetServiceStats(int) (*model.ServiceStats, error) GetActiveMaintenance(now time.Time) (*model.Maintenance, error) + ListMaintenances() ([]model.Maintenance, error) + AddMaintenance(model.Maintenance) (*model.Maintenance, error) + UpdateMaintenance(int, model.Maintenance) (*model.Maintenance, error) + DeleteMaintenance(int) error } |