Skip to content

Commit c58190e

Browse files
authored
fix: restart confirm window out of display range (#2757)
1 parent 5e2f1ba commit c58190e

File tree

3 files changed

+13
-7
lines changed
  • modules/cmp/component-protocol/components

3 files changed

+13
-7
lines changed

modules/cmp/component-protocol/components/cmp-dashboard-events-list/eventTable/render.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ func (t *ComponentEventTable) SetComponentValue(ctx context.Context) {
375375
}
376376
}
377377

378-
func (t *ComponentEventTable) Transfer(c *cptype.Component) {
379-
c.Props = t.Props
380-
c.Data = map[string]interface{}{"list": t.Data.List}
381-
c.State = map[string]interface{}{
378+
func (t *ComponentEventTable) Transfer(component *cptype.Component) {
379+
component.Props = t.Props
380+
component.Data = map[string]interface{}{"list": t.Data.List}
381+
component.State = map[string]interface{}{
382382
"clusterName": t.State.ClusterName,
383383
"filterValues": t.State.FilterValues,
384384
"pageNo": t.State.PageNo,
@@ -387,7 +387,7 @@ func (t *ComponentEventTable) Transfer(c *cptype.Component) {
387387
"total": t.State.Total,
388388
"eventTable__urlQuery": t.State.EventTableUQLQuery,
389389
}
390-
c.Operations = t.Operations
390+
component.Operations = t.Operations
391391
}
392392

393393
func contain(arr []string, target string) bool {

modules/cmp/component-protocol/components/cmp-dashboard-workload-detail/restartButton/model.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ type State struct {
4242
}
4343

4444
type Props struct {
45-
Type string `json:"type"`
46-
Text string `json:"text"`
45+
Type string `json:"type"`
46+
Text string `json:"text"`
47+
TipProps TipProps `json:"tipProps"`
48+
}
49+
50+
type TipProps struct {
51+
Placement string `json:"placement,omitempty"`
4752
}
4853

4954
type Operation struct {

modules/cmp/component-protocol/components/cmp-dashboard-workload-detail/restartButton/render.go

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func (b *ComponentRestartButton) SetComponentValue() {
104104

105105
b.Props.Text = b.sdk.I18n("restart")
106106
b.Props.Type = "primary"
107+
b.Props.TipProps.Placement = "bottom"
107108

108109
operation := Operation{
109110
Key: "restart",

0 commit comments

Comments
 (0)