From e3adcba461a546c691ef984e56aac376a6461977 Mon Sep 17 00:00:00 2001 From: Zexi Li Date: Wed, 25 Feb 2026 19:31:59 +0800 Subject: [PATCH] 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. --- pkg/monitor/models/nodealert.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/monitor/models/nodealert.go b/pkg/monitor/models/nodealert.go index 49873fd37b..2372cb07b6 100644 --- a/pkg/monitor/models/nodealert.go +++ b/pkg/monitor/models/nodealert.go @@ -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{