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
+18
View File
@@ -392,6 +392,23 @@ func (h *APIHandler) buildPublicStatusPage(record *core.Record) *statuspage.Publ
})
}
// Get active incidents for this user (not closed)
var publicIncidents []statuspage.PublicIncident
incidentRecords, _ := h.app.FindAllRecords("incidents",
dbx.NewExp("user = {:user} && status != {:status}",
dbx.Params{"user": record.GetString("user"), "status": "closed"}),
)
for _, incident := range incidentRecords {
publicIncidents = append(publicIncidents, statuspage.PublicIncident{
ID: incident.Id,
Title: incident.GetString("title"),
Description: incident.GetString("description"),
Status: incident.GetString("status"),
Severity: incident.GetString("severity"),
StartedAt: incident.GetDateTime("started_at").Time(),
})
}
return &statuspage.PublicStatusPage{
ID: record.Id,
Name: record.GetString("name"),
@@ -402,6 +419,7 @@ func (h *APIHandler) buildPublicStatusPage(record *core.Record) *statuspage.Publ
Theme: record.GetString("theme"),
CustomCSS: record.GetString("custom_css"),
Monitors: publicMonitors,
Incidents: publicIncidents,
OverallStatus: overallStatus,
UpdatedAt: record.GetDateTime("updated").Time(),
}