diff --git a/backend/src/main/java/io/metersphere/task/service/TaskService.java b/backend/src/main/java/io/metersphere/task/service/TaskService.java index 361bac9d9a..2f62445cc8 100644 --- a/backend/src/main/java/io/metersphere/task/service/TaskService.java +++ b/backend/src/main/java/io/metersphere/task/service/TaskService.java @@ -119,7 +119,7 @@ public class TaskService { } else if (StringUtils.equals(request.getType(), "PERFORMANCE")) { performanceTestService.stopTest(request.getReportId(), false); } - if (StringUtils.isNotEmpty(actuator)) { + if (StringUtils.isNotEmpty(actuator) && !StringUtils.equals(actuator, "LOCAL")) { if (poolMap.containsKey(actuator)) { poolMap.get(actuator).add(request.getReportId()); } else { diff --git a/frontend/src/business/components/task/TaskCenter.vue b/frontend/src/business/components/task/TaskCenter.vue index 23cbb2c6eb..0acb83f490 100644 --- a/frontend/src/business/components/task/TaskCenter.vue +++ b/frontend/src/business/components/task/TaskCenter.vue @@ -79,7 +79,7 @@
- + {{ getModeName(item.executionModule) }} : {{ item.name }} @@ -103,7 +103,9 @@ success - + + stopped + {{ item.executionStatus ? item.executionStatus.toLowerCase() : item.executionStatus }} @@ -184,7 +186,7 @@ export default { format(item) { return ''; }, - packUp(){ + packUp() { this.size = 550; }, stop(row) { @@ -265,7 +267,7 @@ export default { getPercentage(status) { if (status) { status = status.toLowerCase(); - if (status === "waiting") { + if (status === "waiting" || status === 'stop') { return 0; } if (status === 'saved' || status === 'completed' || status === 'success' || status === 'error') { @@ -293,7 +295,11 @@ export default { return this.$t('test_track.api_test_case'); } }, - showReport(row, env) { + showReport(row) { + if (this.size > 550 && this.reportId === row.id) { + this.packUp(); + return; + } let status = row.executionStatus; if (status) { status = row.executionStatus.toLowerCase(); @@ -303,25 +309,20 @@ export default { this.reportType = row.executionModule; switch (row.executionModule) { case "SCENARIO": - // this.$router.push({ - // path: '/api/automation/report/view/' + row.id, - // }); break; case "PERFORMANCE": - // this.$router.push({ - // path: '/performance/report/view/' + row.id, - // }); break; case "API": this.getExecResult(row.id); break; } + } else if (status === 'stop') { + this.$warning("当前任务已停止,无法查看报告"); } else { this.$warning("正在运行中,请稍后查看"); } } }, - getExecResult(reportId) { if (reportId) { let url = "/api/definition/report/get/" + reportId; @@ -359,7 +360,7 @@ export default { if (this.taskData) { let total = 0; this.taskData.forEach(item => { - if (this.getPercentage(item.executionStatus) !== 100) { + if (this.getPercentage(item.executionStatus) !== 100 && this.getPercentage(item.executionStatus) !== 0) { total++; } })