fix(monitor): convert SNodeAlert to SCommonAlert in FetchCustomizeColumns (#24345)

Pass cObjs of type *SCommonAlert to SCommonAlertManager.FetchCustomizeColumns
instead of *SNodeAlert so the parent correctly fetches common alert columns.
This commit is contained in:
Zexi Li
2026-02-25 19:31:59 +08:00
committed by GitHub
parent 3023c9cadb
commit e3adcba461
+6 -1
View File
@@ -574,7 +574,12 @@ func (man *SNodeAlertManager) FetchCustomizeColumns(
) []monitor.NodeAlertDetails {
rows := make([]monitor.NodeAlertDetails, len(objs))
v1Rows := man.SCommonAlertManager.FetchCustomizeColumns(ctx, userCred, query, objs, fields, isList)
cObjs := make([]interface{}, len(objs))
for i := range objs {
obj := objs[i].(*SNodeAlert)
cObjs[i] = &SCommonAlert{obj.SAlert}
}
v1Rows := man.SCommonAlertManager.FetchCustomizeColumns(ctx, userCred, query, cObjs, fields, isList)
for i := range rows {
rows[i] = monitor.NodeAlertDetails{