feat(tui): add state change history view with outage duration
CI / test (pull_request) Successful in 2m30s
CI / lint (pull_request) Failing after 51s
CI / vulncheck (pull_request) Successful in 46s

Full-screen scrollable history view accessible via [h] from detail
panel. Shows all state transitions with computed outage durations,
event density sparkline for flapping detection, and summary stats.

- Detail panel STATE CHANGES now shows outage duration per recovery
- Event density sparkline highlights flapping periods
- Summary footer: event count, outage count, avg outage duration
- Vim-style navigation (j/k/g/G) + mouse scroll in history view
This commit is contained in:
2026-06-03 19:49:10 -04:00
parent c0ad51af9c
commit bc661f5207
6 changed files with 422 additions and 4 deletions
+7 -2
View File
@@ -70,6 +70,7 @@ const (
stateFormUser
stateConfirmDelete
stateFormMaint
stateHistory
)
type Model struct {
@@ -91,8 +92,12 @@ type Model struct {
logViewport viewport.Model
logFilterImportant bool
isAdmin bool
zones *zone.Manager
historyViewport viewport.Model
historyChanges []models.StateChange
historySiteName string
isAdmin bool
zones *zone.Manager
deleteID int
deleteName string