[Feature] Add Alerts History page (#973)

* Add alert history

* refactor

* fix one colunm

* update migration

* add retention
This commit is contained in:
Sven van Ginkel
2025-07-21 01:20:51 +02:00
committed by GitHub
parent 3730a78e5a
commit 9d7fb8ab80
13 changed files with 762 additions and 213 deletions

View File

@@ -293,6 +293,10 @@ func (am *AlertManager) sendSystemAlert(alert SystemAlertData) {
// app.Logger().Error("failed to save alert record", "err", err)
return
}
// Create Alert History
am.RecordAlertHistory(alert)
// expand the user relation and send the alert
if errs := am.hub.ExpandRecord(alert.alertRecord, []string{"user"}, nil); len(errs) > 0 {
// app.Logger().Error("failed to expand user relation", "errs", errs)