d5ab3a18a4
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.
59 lines
1.1 KiB
Go
59 lines
1.1 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Site struct {
|
|
ID int
|
|
Name string
|
|
URL string
|
|
Type string // "http", "push", "ping", "port", "dns", "group"
|
|
Token string
|
|
Interval int
|
|
AlertID int
|
|
CheckSSL bool
|
|
ExpiryThreshold int
|
|
MaxRetries int
|
|
|
|
Hostname string
|
|
Port int
|
|
Timeout int
|
|
Method string
|
|
Description string
|
|
ParentID int
|
|
AcceptedCodes string
|
|
DNSResolveType string
|
|
DNSServer string
|
|
IgnoreTLS bool
|
|
Paused bool
|
|
|
|
FailureCount int
|
|
Status string
|
|
StatusCode int
|
|
Latency time.Duration
|
|
CertExpiry time.Time
|
|
HasSSL bool
|
|
LastCheck time.Time
|
|
SentSSLWarning bool
|
|
}
|
|
|
|
type AlertConfig struct {
|
|
ID int
|
|
Name string
|
|
Type string
|
|
Settings map[string]string
|
|
}
|
|
|
|
type User struct {
|
|
ID int
|
|
Username string
|
|
PublicKey string
|
|
Role string
|
|
}
|
|
|
|
// Phase 5: Backup Structure
|
|
type Backup struct {
|
|
Sites []Site `json:"sites"`
|
|
Alerts []AlertConfig `json:"alerts"`
|
|
Users []User `json:"users"`
|
|
}
|