mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
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:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user