feat(tui): add SLA reporting view #58

Merged
lerko merged 1 commits from feat/sla-reporting into main 2026-06-04 18:40:50 +00:00
Owner

Summary

  • Full-screen SLA report view accessible via [s] from detail panel
  • Computes uptime%, downtime, outage count, longest outage, MTTR, MTBF from state_changes table
  • Daily breakdown with bar chart visualization
  • Switchable time periods: 24h / 7d / 30d / 90d
  • Scrollable viewport with keyboard and mouse support
  • LATE/STALE treated as UP for SLA purposes (service responding)
  • New store method GetStateChangesSince for time-windowed queries

Phase 1 Backlog

Closes item #5 (SLA reporting). Biggest item — builds on state_changes infrastructure from PR #55.

Merge Note

Overlaps with PR #57 (push STALE) in tui.go, view_detail.go, monitor.go. Merge #57 first, then rebase this.

Test Plan

  • go test ./... — all tests pass (8 new SLA tests)
  • go build ./... — clean
  • go vet ./... — clean
  • Manual: open detail panel → press [s] → verify SLA view renders
  • Manual: switch periods with [1]-[4], verify data updates
  • Manual: scroll daily breakdown with j/k
## Summary - Full-screen SLA report view accessible via [s] from detail panel - Computes uptime%, downtime, outage count, longest outage, MTTR, MTBF from state_changes table - Daily breakdown with bar chart visualization - Switchable time periods: 24h / 7d / 30d / 90d - Scrollable viewport with keyboard and mouse support - LATE/STALE treated as UP for SLA purposes (service responding) - New store method `GetStateChangesSince` for time-windowed queries ## Phase 1 Backlog Closes item #5 (SLA reporting). Biggest item — builds on state_changes infrastructure from PR #55. ## Merge Note Overlaps with PR #57 (push STALE) in `tui.go`, `view_detail.go`, `monitor.go`. Merge #57 first, then rebase this. ## Test Plan - [x] `go test ./...` — all tests pass (8 new SLA tests) - [x] `go build ./...` — clean - [x] `go vet ./...` — clean - [x] Manual: open detail panel → press [s] → verify SLA view renders - [x] Manual: switch periods with [1]-[4], verify data updates - [x] Manual: scroll daily breakdown with j/k
lerko force-pushed feat/sla-reporting from 8617d204ef to 3480679176 2026-06-04 17:32:23 +00:00 Compare
lerko added 1 commit 2026-06-04 18:24:58 +00:00
feat(tui): add SLA reporting view
CI / test (pull_request) Successful in 2m35s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 41s
60592ef810
Full-screen SLA report accessible via [s] from detail panel.
Computes uptime%, downtime, outage count, longest outage, MTTR,
and MTBF from state_changes table. Includes daily breakdown with
bar chart, switchable time periods (24h/7d/30d/90d), and
scrollable viewport. LATE/STALE treated as UP for SLA purposes.
lerko force-pushed feat/sla-reporting from 3480679176 to 60592ef810 2026-06-04 18:24:58 +00:00 Compare
lerko merged commit 60592ef810 into main 2026-06-04 18:40:50 +00:00
lerko deleted branch feat/sla-reporting 2026-06-04 18:40:50 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerkolabs/uptop#58