diff --git a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index 86ff818f03..095126a15c 100644 --- a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -103,6 +103,11 @@ public class WorkspaceController { return workspaceService.getWorkspaceIdsByOrgId(orgId); } + @GetMapping("/list/orgworkspace/{userId}/{orgId}") + public List getWorkspaceListByOrgId(@PathVariable String userId, @PathVariable String orgId) { + return workspaceService.getWorkspaceIdsByOrgId(orgId); + } + @PostMapping("/member/update") @MsAuditLog(module = "workspace_member", type = OperLogConstants.UPDATE, beforeEvent = "#msClass.getLogDetails(#memberDTO)", content = "#msClass.getLogDetails(#memberDTO)", msClass = WorkspaceService.class) public void updateOrgMember(@RequestBody WorkspaceMemberDTO memberDTO) { diff --git a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java index f9bd32b13b..49165e9b55 100644 --- a/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java +++ b/backend/src/main/java/io/metersphere/track/controller/TestPlanController.java @@ -152,14 +152,15 @@ public class TestPlanController { Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, testPlanProjectService.getProjectByPlanId(request)); } + @PostMapping("/testplan/jenkins") - public void runJenkins(@RequestBody TestplanRunRequest testplanRunRequest) { + public String runJenkins(@RequestBody TestplanRunRequest testplanRunRequest) { ApiRunConfigDTO api = new ApiRunConfigDTO(); api.setMode(testplanRunRequest.getMode()); api.setResourcePoolId(testplanRunRequest.getResourcePoolId()); api.setOnSampleError(true); api.setReportType("iddReport"); String apiRunConfig = JSONObject.toJSONString(api); - testPlanService.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig); + return testPlanService.run(testplanRunRequest.getTestPlanId(), testplanRunRequest.getProjectId(), testplanRunRequest.getUserId(), testplanRunRequest.getTriggerMode(), apiRunConfig); } } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java index a6b6dd79f7..7087a0e0ca 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanReportService.java @@ -500,6 +500,12 @@ public class TestPlanReportService { noticeSendService.send(testPlanReport.getTriggerMode(), noticeModel); } + public List getTestPlanReportApi(String planId) { + TestPlanReportExample example = new TestPlanReportExample(); + example.createCriteria().andTestPlanIdEqualTo(planId); + return testPlanReportMapper.selectByExample(example); + } + public TestPlanReport getTestPlanReport(String planId) { return testPlanReportMapper.selectByPrimaryKey(planId); } diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index bf199859fa..e8de42f31d 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -1000,7 +1000,7 @@ public class TestPlanService { return returnId; } - public void run(String testPlanID, String projectID, String userId, String triggerMode, String apiRunConfig) { + public String run(String testPlanID, String projectID, String userId, String triggerMode, String apiRunConfig) { Map planScenarioIdMap; Map apiTestCaseIdMap; Map performanceIdMap; @@ -1160,6 +1160,7 @@ public class TestPlanService { testPlanReport.setIsPerformanceExecuting(performaceIsExcuting); testPlanReportService.update(testPlanReport); } + return testPlanReport.getId(); } public String getLogDetails(String id) { diff --git a/frontend/src/business/components/common/model/JsonData.js b/frontend/src/business/components/common/model/JsonData.js index 2a4086abca..299a5bfa19 100644 --- a/frontend/src/business/components/common/model/JsonData.js +++ b/frontend/src/business/components/common/model/JsonData.js @@ -87,7 +87,7 @@ export const Test_Plan_Function_Test_Case = [ //测试计划-api用例 export const Test_Plan_Api_Case = [ {id: 'num', label: i18n.t('commons.id')}, - {id: 'name', label: i18n.t('api_test.definition.api_name')}, + {id: 'name', label: i18n.t('test_track.case.name')}, {id: 'priority', label: i18n.t('test_track.case.priority')}, {id: 'path', label: i18n.t('api_test.definition.api_path')}, {id: 'createUser', label: '创建人'}, diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue index 8f35ee3879..57706be7be 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue @@ -37,7 +37,7 @@ show-overflow-tooltip :key="index"/> + :label="$t('test_track.case.name')" show-overflow-tooltip :key="index"/>