diff --git a/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java b/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java index b510f59eb1..7ea473a470 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/ShareController.java @@ -78,16 +78,4 @@ public class ShareController { HttpHeaderUtils.clearUser(); return reportExtInfo; } - - @GetMapping("test/plan/ext/plan/{shareId}/{planId}") - public ExecutionModeDTO getExtPlan(@PathVariable String shareId, @PathVariable String planId) throws JsonProcessingException { - shareInfoService.validate(shareId, planId); - if (SessionUtils.getUser() == null) { - HttpHeaderUtils.runAsUser("admin"); - } - // testPlanService.getExtInfoByPlanId 这个方法逻辑有问题。分不清楚干嘛用的。方法删了,调用地方先注释了。 - // TestPlanExtReportDTO reportExtInfo = testPlanService.getExtInfoByPlanId(planId); - HttpHeaderUtils.clearUser(); - return new ExecutionModeDTO(); - } } diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java index 84aadfbd35..5135e32d3a 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanController.java @@ -14,7 +14,6 @@ import io.metersphere.dto.TestPlanRerunParametersDTO; import io.metersphere.i18n.Translator; import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.notice.annotation.SendNotice; -import io.metersphere.plan.dto.ExecutionModeDTO; import io.metersphere.plan.dto.TestCaseReportStatusResultDTO; import io.metersphere.plan.dto.TestPlanDTO; import io.metersphere.plan.dto.TestPlanReportDataStruct; @@ -380,14 +379,4 @@ public class TestPlanController { public void resetStatus(@PathVariable String planId) { testPlanService.resetStatus(planId); } - - @GetMapping("/ext/report/{reportId}") - public ExecutionModeDTO getExtReport(@PathVariable String reportId) throws JsonProcessingException { - return new ExecutionModeDTO(); - } - - @GetMapping("/ext/plan/{planId}") - public ExecutionModeDTO getExtPlan(@PathVariable String planId) throws JsonProcessingException { - return new ExecutionModeDTO(); - } } diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java index 42cea3214d..807c641d76 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanReportService.java @@ -1124,7 +1124,11 @@ public class TestPlanReportService { }); String resourcePoolNames = StringUtils.join(resourcePoolName.toArray(), StringUtils.SPACE); report.setResourcePool(resourcePoolNames); + } else { + report.setResourcePool("LOCAL"); } + } else { + report.setResourcePool("LOCAL"); } return report; } @@ -1156,7 +1160,11 @@ public class TestPlanReportService { }); String resourcePoolNames = StringUtils.join(resourcePoolName.toArray(), StringUtils.SPACE); testPlanReportDTO.setResourcePool(resourcePoolNames); + } else { + testPlanReportDTO.setResourcePool("LOCAL"); } + } else { + testPlanReportDTO.setResourcePool("LOCAL"); } // 环境组/运行环境 if (StringUtils.isNotEmpty(runInfoDTO.getEnvGroupId())) { diff --git a/test-track/frontend/src/api/remote/plan/test-plan.js b/test-track/frontend/src/api/remote/plan/test-plan.js index b2d743ecc0..d6ebd61423 100644 --- a/test-track/frontend/src/api/remote/plan/test-plan.js +++ b/test-track/frontend/src/api/remote/plan/test-plan.js @@ -390,23 +390,3 @@ export function reportSocket(reportId) { export function testPlanLoadCaseEditStatus(planId) { return post(BASE_URL + `edit/status/${planId}`, new Promise(() => {})); } - -export function getTestPlanExtReport(planId, reportId) { - if (reportId) { - return get(BASE_URL + "ext/report/" + reportId); - } else if (planId) { - return get(BASE_URL + "ext/plan/" + planId); - } else { - return new Promise(() => {}); - } -} - -export function getShareTestPlanExtReport(shareId, planId, reportId) { - if (reportId) { - return get("/share" + BASE_URL + `ext/report/${shareId}/${reportId}`); - } else if (planId) { - return get("/share" + BASE_URL + `ext/plan/${shareId}/${planId}`); - } else { - return new Promise(() => {}); - } -} diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue index cafa61339a..e7cd8eff50 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/TestPlanApiReport.vue @@ -1,56 +1,152 @@