feat(tui,status): add per-site pause, fix viewport, polish status page

Per-site pause: [p] key toggles pause for selected monitor in TUI.
Paused monitors skip checks, persist to DB, show on status page.

Status page: replace full-page reload with fetch-based DOM updates
to eliminate scroll-jump on refresh. Add summary bar (UP/DOWN/PAUSED
counts), stale-data indicator, and fix SSL EXP CSS class bug.

TUI: constrain tables to terminal width via lipgloss .Width() to
prevent row wrapping that pushed header off-screen. Add MaxHeight
safety net. Bump subtle style from #383838 to #565f89 for
readability on dark terminals.
This commit is contained in:
2026-05-14 18:46:17 -04:00
parent f17f8c9f93
commit d5ab3a18a4
10 changed files with 199 additions and 77 deletions
+9 -13
View File
@@ -26,8 +26,6 @@ var (
userBorderStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("#444"))
userColWidths = []int{4, 16, 10, 44}
)
type userFormData struct {
@@ -73,27 +71,25 @@ func (m Model) viewUsersTab() string {
})
}
tableWidth := m.termWidth - 6
if tableWidth < 40 {
tableWidth = 40
}
t := table.New().
Border(lipgloss.RoundedBorder()).
BorderStyle(userBorderStyle).
Width(tableWidth).
Headers("ID", "USERNAME", "ROLE", "PUBLIC KEY").
Rows(rows...).
StyleFunc(func(row, col int) lipgloss.Style {
if row == table.HeaderRow {
s := userHeaderStyle
if col < len(userColWidths) {
s = s.Width(userColWidths[col])
}
return s
return userHeaderStyle
}
s := userCellStyle
if row == selectedVisual {
s = userSelectedStyle
return userSelectedStyle
}
if col < len(userColWidths) {
s = s.Width(userColWidths[col])
}
return s
return userCellStyle
})
return "\n" + t.Render()