feat(tui): add SLA reporting view
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.
This commit is contained in:
+11
-2
@@ -71,6 +71,7 @@ const (
|
||||
stateConfirmDelete
|
||||
stateFormMaint
|
||||
stateHistory
|
||||
stateSLA
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
@@ -96,8 +97,16 @@ type Model struct {
|
||||
historyViewport viewport.Model
|
||||
historyChanges []models.StateChange
|
||||
historySiteName string
|
||||
isAdmin bool
|
||||
zones *zone.Manager
|
||||
|
||||
slaViewport viewport.Model
|
||||
slaReport monitor.SLAReport
|
||||
slaDailyBreakdown []monitor.DayReport
|
||||
slaSiteName string
|
||||
slaSiteID int
|
||||
slaPeriodIdx int
|
||||
|
||||
isAdmin bool
|
||||
zones *zone.Manager
|
||||
|
||||
deleteID int
|
||||
deleteName string
|
||||
|
||||
Reference in New Issue
Block a user