fix(tui,status,store): add delete confirm, input validation, XSS fix, history persistence
Prevent accidental deletes with y/n confirmation dialog. Validate all numeric form inputs (interval, port, timeout, threshold, retries) with range checks instead of silently defaulting to zero. Escape user-supplied data in status page JavaScript to close XSS via monitor names. Persist check history to new check_history table so sparklines and uptime percentages survive restarts.
This commit is contained in:
@@ -50,7 +50,13 @@ type User struct {
|
||||
Role string
|
||||
}
|
||||
|
||||
// Phase 5: Backup Structure
|
||||
type CheckRecord struct {
|
||||
SiteID int
|
||||
LatencyNs int64
|
||||
IsUp bool
|
||||
CheckedAt time.Time
|
||||
}
|
||||
|
||||
type Backup struct {
|
||||
Sites []Site `json:"sites"`
|
||||
Alerts []AlertConfig `json:"alerts"`
|
||||
|
||||
Reference in New Issue
Block a user