diff --git a/modules/cmp/component-protocol/components/cmp-dashboard-events-list/eventTable/render.go b/modules/cmp/component-protocol/components/cmp-dashboard-events-list/eventTable/render.go index 4e14de8441e..5e43a40f9bf 100644 --- a/modules/cmp/component-protocol/components/cmp-dashboard-events-list/eventTable/render.go +++ b/modules/cmp/component-protocol/components/cmp-dashboard-events-list/eventTable/render.go @@ -375,10 +375,10 @@ func (t *ComponentEventTable) SetComponentValue(ctx context.Context) { } } -func (t *ComponentEventTable) Transfer(component *cptype.Component) { - component.Props = t.Props - component.Data = map[string]interface{}{"list": t.Data.List} - component.State = map[string]interface{}{ +func (t *ComponentEventTable) Transfer(c *cptype.Component) { + c.Props = t.Props + c.Data = map[string]interface{}{"list": t.Data.List} + c.State = map[string]interface{}{ "clusterName": t.State.ClusterName, "filterValues": t.State.FilterValues, "pageNo": t.State.PageNo, @@ -387,7 +387,7 @@ func (t *ComponentEventTable) Transfer(component *cptype.Component) { "total": t.State.Total, "eventTable__urlQuery": t.State.EventTableUQLQuery, } - component.Operations = t.Operations + c.Operations = t.Operations } func contain(arr []string, target string) bool { diff --git a/modules/cmp/component-protocol/components/cmp-dashboard-workload-detail/restartButton/render.go b/modules/cmp/component-protocol/components/cmp-dashboard-workload-detail/restartButton/render.go index 02eb05bd7f7..861e4bd372d 100644 --- a/modules/cmp/component-protocol/components/cmp-dashboard-workload-detail/restartButton/render.go +++ b/modules/cmp/component-protocol/components/cmp-dashboard-workload-detail/restartButton/render.go @@ -200,7 +200,7 @@ func (b *ComponentRestartButton) restartWorkload(userID, orgID, clusterName, kin case string(apistructs.K8SStatefulSet): _, err = client.ClientSet.AppsV1().StatefulSets(namespace).Patch(b.ctx, name, types.StrategicMergePatchType, data, v1.PatchOptions{}) case string(apistructs.K8SDaemonSet): - _, err = client.ClientSet.AppsV1().StatefulSets(namespace).Patch(b.ctx, name, types.StrategicMergePatchType, data, v1.PatchOptions{}) + _, err = client.ClientSet.AppsV1().DaemonSets(namespace).Patch(b.ctx, name, types.StrategicMergePatchType, data, v1.PatchOptions{}) default: return errors.Errorf("invalid workload kind %s (only deployment, statefulSet and daemonSet can be restarted)", kind) }