feat(site): enhance monitoring dashboard and public status pages

Implement incident tracking for public status pages, improve the monitoring
dashboard UI with better grouping and loading states, and refine domain
resolution logic.

- feat(hub): add incident support to public status pages
- feat(hub): implement immediate monitor checks on creation and resume
- feat(hub): improve domain status detection using DNS fallback when WHOIS fails
- feat(site): redesign monitoring dashboard with categorized cards
- feat(site): add incident detail view and management in the dashboard
- feat(site): add active incidents section to public status pages
- feat(site): add "Add System" functionality to systems table
- refactor(site): improve calendar view responsiveness and loading states
- style(site): add skeleton components for better UX during data fetching
This commit is contained in:
Tomas Dvorak
2026-05-01 15:07:22 +02:00
parent 7727be166b
commit c7e2c88604
15 changed files with 866 additions and 186 deletions
+48 -36
View File
@@ -4,18 +4,18 @@ import "time"
// StatusPage represents a public status page configuration
type StatusPage struct {
ID string `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Slug string `json:"slug" db:"slug"`
Title string `json:"title" db:"title"`
Description string `json:"description" db:"description"`
Logo string `json:"logo" db:"logo"`
Favicon string `json:"favicon" db:"favicon"`
Theme string `json:"theme" db:"theme"` // light, dark, auto
CustomCSS string `json:"custom_css" db:"custom_css"`
Public bool `json:"public" db:"public"`
ShowUptime bool `json:"show_uptime" db:"show_uptime"`
UserID string `json:"user" db:"user"`
ID string `json:"id" db:"id"`
Name string `json:"name" db:"name"`
Slug string `json:"slug" db:"slug"`
Title string `json:"title" db:"title"`
Description string `json:"description" db:"description"`
Logo string `json:"logo" db:"logo"`
Favicon string `json:"favicon" db:"favicon"`
Theme string `json:"theme" db:"theme"` // light, dark, auto
CustomCSS string `json:"custom_css" db:"custom_css"`
Public bool `json:"public" db:"public"`
ShowUptime bool `json:"show_uptime" db:"show_uptime"`
UserID string `json:"user" db:"user"`
Created time.Time `json:"created" db:"created"`
Updated time.Time `json:"updated" db:"updated"`
}
@@ -31,19 +31,31 @@ type StatusPageMonitor struct {
UserID string `json:"user" db:"user"`
}
// PublicIncident represents an incident for public display
type PublicIncident struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Status string `json:"status"`
Severity string `json:"severity"`
StartedAt time.Time `json:"started_at"`
ResolvedAt time.Time `json:"resolved_at,omitempty"`
}
// PublicStatusPage represents a status page for public viewing
type PublicStatusPage struct {
ID string `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
Logo string `json:"logo"`
Favicon string `json:"favicon"`
Theme string `json:"theme"`
CustomCSS string `json:"custom_css,omitempty"`
Monitors []PublicMonitorStatus `json:"monitors"`
OverallStatus string `json:"overall_status"`
UpdatedAt time.Time `json:"updated_at"`
ID string `json:"id"`
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
Logo string `json:"logo"`
Favicon string `json:"favicon"`
Theme string `json:"theme"`
CustomCSS string `json:"custom_css,omitempty"`
Monitors []PublicMonitorStatus `json:"monitors"`
Incidents []PublicIncident `json:"incidents"`
OverallStatus string `json:"overall_status"`
UpdatedAt time.Time `json:"updated_at"`
}
// PublicMonitorStatus represents a monitor's status for public display
@@ -96,19 +108,19 @@ type StatusPageMonitorRequest struct {
// StatusPageResponse represents a status page response
type StatusPageResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Title string `json:"title"`
Description string `json:"description"`
Logo string `json:"logo"`
Favicon string `json:"favicon"`
Theme string `json:"theme"`
Public bool `json:"public"`
ShowUptime bool `json:"show_uptime"`
MonitorCount int `json:"monitor_count"`
Created string `json:"created"`
Updated string `json:"updated"`
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Title string `json:"title"`
Description string `json:"description"`
Logo string `json:"logo"`
Favicon string `json:"favicon"`
Theme string `json:"theme"`
Public bool `json:"public"`
ShowUptime bool `json:"show_uptime"`
MonitorCount int `json:"monitor_count"`
Created string `json:"created"`
Updated string `json:"updated"`
}
// Overall status constants