feat: implement V2 alert center and scoped alert governance

This commit is contained in:
Yvan
2026-11-05 20:08:29 +08:00
parent f8e26c5baf
commit 999c9a6315
57 changed files with 2711 additions and 216 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ func TestAlertRecordsScopeAndSummaryUseDifferentFilters(t *testing.T) {
scope := alertTestScope(7)
status := 1
page, err := repo.List(ctx, scope, business.AlertRecordFilter{RuleName: "注册", Status: &status})
if err != nil || page.Total != 1 || len(page.StatusCount) != 3 || page.StatusCount[3] != 1 || page.StatusCount[2] != 1 {
t.Fatalf("汇总错误继承名称或状态筛选: %+v %v", page, err)
if err != nil || page.Total != 1 || len(page.StatusCount) != 1 || page.StatusCount[1] != 1 {
t.Fatalf("汇总应继承名称筛选并忽略状态自身: %+v %v", page, err)
}
selected := alertTestScope(8).Viewer
scope.Selected = &selected