Add public monitoring features and CI updates

- Add status pages, incidents, badges, maintenance, bulk ops, and metrics
- Add Docker packaging, env example, and frontend routes
- Refresh GitHub workflows and project metadata
This commit is contained in:
Tomas Dvorak
2026-04-27 11:10:18 +02:00
parent 363d708e91
commit 8011d487f1
101 changed files with 16126 additions and 2028 deletions
+20
View File
@@ -5,6 +5,7 @@ import (
"fmt"
"net/mail"
"net/url"
"strings"
"sync"
"time"
@@ -200,6 +201,25 @@ func (am *AlertManager) SendAlert(data AlertMessageData) error {
return nil
}
// check if in maintenance window - suppress alerts if so
records, _ := am.hub.FindAllRecords("maintenance_windows",
dbx.NewExp("status = {:status} AND start_time <= {:now} AND end_time >= {:now} AND suppress_alerts = true",
dbx.Params{"status": "scheduled", "now": time.Now()}),
)
for _, r := range records {
// Check if this alert relates to a monitor or domain in maintenance
if data.Link != "" {
if monitorID := r.GetString("monitor"); monitorID != "" && strings.Contains(data.Link, monitorID) {
am.hub.Logger().Info("Alert suppressed due to maintenance window", "monitor", monitorID)
return nil
}
if domainID := r.GetString("domain"); domainID != "" && strings.Contains(data.Link, domainID) {
am.hub.Logger().Info("Alert suppressed due to maintenance window", "domain", domainID)
return nil
}
}
}
// get user settings
record, err := am.hub.FindFirstRecordByFilter(
"user_settings", "user={:user}",