diff --git a/modules/openapi/component-protocol/scenarios/auto-test-plan-detail/components/executeTaskTable/render.go b/modules/openapi/component-protocol/scenarios/auto-test-plan-detail/components/executeTaskTable/render.go index c91be5a9383..b6dbea5d1ab 100644 --- a/modules/openapi/component-protocol/scenarios/auto-test-plan-detail/components/executeTaskTable/render.go +++ b/modules/openapi/component-protocol/scenarios/auto-test-plan-detail/components/executeTaskTable/render.go @@ -212,6 +212,12 @@ func getProps() map[string]interface{} { Width: 85, Ellipsis: true, }, + { + Title: "步骤", + DataIndex: "step", + Width: 85, + Ellipsis: true, + }, { Title: "子任务数", DataIndex: "tasksNum", @@ -291,6 +297,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error num := (a.State.PageNo - 1) * (a.State.PageSize) ret := a.State.PageSize a.State.Total = 0 + stepIdx := 1 for _, each := range pipeline.PipelineStages { a.State.Total += int64(len(each.PipelineTasks)) if ret == 0 { @@ -425,6 +432,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error "type": transformStepType(res.Type), "path": path, "time": a.getCostTime(task), + "step": stepIdx, } if task.SnippetPipelineID != nil && (res.Type == apistructs.StepTypeScene || @@ -460,6 +468,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error "type": transformStepType(apistructs.AutotestSceneSet), "path": "", "time": a.getCostTime(task), + "step": stepIdx, } if task.SnippetPipelineDetail != nil { list["tasksNum"] = task.SnippetPipelineDetail.DirectSnippetTasksNum @@ -493,6 +502,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error "type": transformStepType(apistructs.AutotestScene), "path": "", "time": a.getCostTime(task), + "step": stepIdx, } if task.SnippetPipelineDetail != nil { list["tasksNum"] = task.SnippetPipelineDetail.DirectSnippetTasksNum @@ -507,6 +517,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error break } } + stepIdx++ } if a.State.Total <= (a.State.PageNo-1)*(a.State.PageSize) && a.State.Total > 0 { a.State.PageNo = DefaultPageNo diff --git a/modules/openapi/component-protocol/scenarios/auto-test-scenes/components/executeTaskTable/render.go b/modules/openapi/component-protocol/scenarios/auto-test-scenes/components/executeTaskTable/render.go index 6724444f606..6b1b173ced0 100644 --- a/modules/openapi/component-protocol/scenarios/auto-test-scenes/components/executeTaskTable/render.go +++ b/modules/openapi/component-protocol/scenarios/auto-test-scenes/components/executeTaskTable/render.go @@ -216,6 +216,12 @@ func getProps() map[string]interface{} { Width: 85, Ellipsis: true, }, + { + Title: "步骤", + DataIndex: "step", + Width: 85, + Ellipsis: true, + }, { Title: "子任务数", DataIndex: "tasksNum", @@ -282,7 +288,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error num := (a.State.PageNo - 1) * (a.State.PageSize) ret := a.State.PageSize a.State.Total = 0 - + stepIdx := 1 for _, each := range pipeline.PipelineStages { a.State.Total += int64(len(each.PipelineTasks)) @@ -352,6 +358,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error "status": getStatus(task.Status), "type": transformStepType(apistructs.StepAPIType(task.Type)), "path": "", + "step": stepIdx, } } else { // autotest task @@ -429,6 +436,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error "status": getStatus(task.Status), "type": transformStepType(res.Type), "path": path, + "step": stepIdx, } // scene or configSheet add other info @@ -448,6 +456,7 @@ func (a *ExecuteTaskTable) setData(pipeline *apistructs.PipelineDetailDTO) error break } } + stepIdx++ } if a.State.Total <= (a.State.PageNo-1)*(a.State.PageSize) && a.State.Total > 0 {