fix(任务中心): 资源池下拉选项调整
--bug=1048305 --user=王旭 【任务中心】详情列表-资源池下拉k8s无节点选项 https://www.tapd.cn/55049933/s/1600825
This commit is contained in:
parent
6beafce34a
commit
7331d2c85f
|
@ -1,5 +1,6 @@
|
|||
package io.metersphere.system.dto.taskhub;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.metersphere.system.dto.sdk.OptionDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
@ -13,6 +14,7 @@ import java.util.List;
|
|||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
public class ResourcePoolOptionsDTO extends OptionDTO {
|
||||
|
||||
@Schema(description = "资源池节点")
|
||||
|
|
|
@ -253,7 +253,7 @@ public class TestPlanExecuteService {
|
|||
extTestPlanApiScenarioMapper.countByPlanIds(childPlanIds);
|
||||
}
|
||||
// 初始化任务
|
||||
ExecTask execTask = initExecTask(executionQueue.getTaskId(), caseTotal, testPlan.getName(), project, executionQueue.getCreateUser(), executionQueue.getExecutionSource(), executionQueue.getPrepareReportId());
|
||||
ExecTask execTask = initExecTask(executionQueue.getTaskId(), caseTotal, testPlan, project, executionQueue.getCreateUser(), executionQueue.getExecutionSource(), executionQueue.getPrepareReportId());
|
||||
|
||||
// 预生成计划组报告
|
||||
Map<String, String> reportMap = testPlanReportService.genReportByExecution(executionQueue.getPrepareReportId(), execTask.getId(), genReportRequest, executionQueue.getCreateUser());
|
||||
|
@ -309,7 +309,7 @@ public class TestPlanExecuteService {
|
|||
Integer caseTotal = extTestPlanApiCaseMapper.countByPlanIds(List.of(testPlan.getId())) +
|
||||
extTestPlanApiScenarioMapper.countByPlanIds(List.of(testPlan.getId()));
|
||||
// 初始化任务
|
||||
ExecTask execTask = initExecTask(executionQueue.getTaskId(), caseTotal, testPlan.getName(), project, executionQueue.getCreateUser(), executionQueue.getExecutionSource(), executionQueue.getPrepareReportId());
|
||||
ExecTask execTask = initExecTask(executionQueue.getTaskId(), caseTotal, testPlan, project, executionQueue.getCreateUser(), executionQueue.getExecutionSource(), executionQueue.getPrepareReportId());
|
||||
|
||||
Map<String, String> reportMap = testPlanReportService.genReportByExecution(executionQueue.getPrepareReportId(), execTask.getId(), genReportRequest, executionQueue.getCreateUser());
|
||||
executionQueue.setPrepareReportId(reportMap.get(executionQueue.getSourceID()));
|
||||
|
@ -319,14 +319,14 @@ public class TestPlanExecuteService {
|
|||
}
|
||||
}
|
||||
|
||||
private ExecTask initExecTask(String taskId, int caseSize, String name, Project project, String userId, String triggerMode, String reportId) {
|
||||
private ExecTask initExecTask(String taskId, int caseSize, TestPlan testPlan, Project project, String userId, String triggerMode, String reportId) {
|
||||
ExecTask execTask = apiCommonService.newExecTask(project.getId(), userId);
|
||||
execTask.setId(taskId);
|
||||
execTask.setCaseCount(Long.valueOf(caseSize));
|
||||
execTask.setTaskName(name);
|
||||
execTask.setTaskName(testPlan.getName());
|
||||
execTask.setOrganizationId(project.getOrganizationId());
|
||||
execTask.setTriggerMode(triggerMode);
|
||||
execTask.setTaskType(ExecTaskType.TEST_PLAN.name());
|
||||
execTask.setTaskType(StringUtils.equalsIgnoreCase(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_PLAN) ? ExecTaskType.TEST_PLAN.name() : ExecTaskType.TEST_PLAN_GROUP.name());
|
||||
baseTaskHubService.insertExecTask(execTask);
|
||||
|
||||
// 创建报告和任务的关联关系
|
||||
|
|
Loading…
Reference in New Issue