diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 9da3974953..6ac27b6001 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -332,8 +332,10 @@ public class ApiAutomationService { public ApiScenarioDTO getApiScenario(String id) { ApiScenarioDTO apiScenarioDTO = new ApiScenarioDTO(); ApiScenarioWithBLOBs scenarioWithBLOBs = apiScenarioMapper.selectByPrimaryKey(id); - BeanUtils.copyBean(apiScenarioDTO, scenarioWithBLOBs); - setApiScenarioProjectIds(apiScenarioDTO); + if (scenarioWithBLOBs != null) { + BeanUtils.copyBean(apiScenarioDTO, scenarioWithBLOBs); + setApiScenarioProjectIds(apiScenarioDTO); + } return apiScenarioDTO; } diff --git a/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java b/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java index 20c2ab2dd9..78bd20ff87 100644 --- a/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/LoginRequest.java @@ -20,7 +20,7 @@ public class LoginRequest { try { RsaKey rsaKey = CommonBeanFactory.getBean(RsaKey.class); return RsaUtil.privateDecrypt(username, rsaKey.getPrivateKey()); - } catch (NoSuchAlgorithmException e) { + } catch (Exception e) { return username; } } @@ -29,7 +29,7 @@ public class LoginRequest { try { RsaKey rsaKey = CommonBeanFactory.getBean(RsaKey.class); return RsaUtil.privateDecrypt(password, rsaKey.getPrivateKey()); - } catch (NoSuchAlgorithmException e) { + } catch (Exception e) { return password; } } diff --git a/backend/src/main/java/io/metersphere/ldap/controller/LdapController.java b/backend/src/main/java/io/metersphere/ldap/controller/LdapController.java index 6771d3a87e..abf6b7299b 100644 --- a/backend/src/main/java/io/metersphere/ldap/controller/LdapController.java +++ b/backend/src/main/java/io/metersphere/ldap/controller/LdapController.java @@ -14,7 +14,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.springframework.ldap.core.DirContextOperations; import org.springframework.web.bind.annotation.*; - import javax.annotation.Resource; @RestController diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java index 3cff08ec4e..3a6d74178e 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java @@ -377,7 +377,7 @@ public class TestCaseReviewService { sqlSession.flushStatements(); //同步添加关联的接口和测试用例 - if(request.getChecked()){ + /* if(request.getChecked()){ if (!testCaseIds.isEmpty()) { testCaseIds.forEach(caseId -> { TestCaseWithBLOBs testDtail=testCaseMapper.selectByPrimaryKey(caseId); @@ -434,7 +434,7 @@ public class TestCaseReviewService { }); } - } + }*/ TestCaseReview testCaseReview = testCaseReviewMapper.selectByPrimaryKey(request.getReviewId()); if (StringUtils.equals(testCaseReview.getStatus(), TestCaseReviewStatus.Prepare.name()) || StringUtils.equals(testCaseReview.getStatus(), TestCaseReviewStatus.Completed.name())) { diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index adefde265f..efd6af73b7 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit adefde265ff12d4ea909353c3f46008f8a8e17e7 +Subproject commit efd6af73b7c5cc53cd4515772000bc1436c49837 diff --git a/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue b/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue index 31e8805ba4..c2aea0332c 100644 --- a/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/common/ApiBaseComponent.vue @@ -12,7 +12,7 @@ + @click="active(data)" v-if="data.type!='scenario' && !isMax " @click.stop/> @@ -113,9 +113,6 @@ this.$refs.nameEdit.focus(); }); } - if (this.data && this.data.type === "JmeterElement") { - this.data.active = false; - } if (this.data && ELEMENTS.get("AllSamplerProxy").indexOf(this.data.type) != -1) { if (!this.data.method) { this.data.method = this.data.protocol; diff --git a/frontend/src/business/components/api/automation/scenario/component/JmeterElementComponent.vue b/frontend/src/business/components/api/automation/scenario/component/JmeterElementComponent.vue index 28cb9a1843..7c47a3484b 100644 --- a/frontend/src/business/components/api/automation/scenario/component/JmeterElementComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/component/JmeterElementComponent.vue @@ -2,6 +2,7 @@ - +
+ +
@@ -56,6 +59,9 @@ copyRow() { this.$emit('copyRow', this.jsr223Processor, this.node); }, + active() { + this.request.active = !this.request.active; + }, } } diff --git a/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue b/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue index bc87648903..fb6ce10dbb 100644 --- a/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/maximize/MaximizeScenario.vue @@ -459,11 +459,11 @@ } else { this.operatingElements = []; } - if (data && data.type != "JmeterElement") { + if (data) { data.active = true; if (data.hashTree) { data.hashTree.forEach(item => { - if (item && item.type != "JmeterElement") { + if (item) { item.active = true; } }) @@ -915,7 +915,7 @@ setProjectEnvMap(projectEnvMap) { this.projectEnvMap = projectEnvMap; }, - refReload(data,node) { + refReload(data, node) { this.selectedTreeNode = data; this.selectedNode = node; this.initProjectIds(); diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionXPath2.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionXPath2.vue index c134f9faea..1c686b3afe 100644 --- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionXPath2.vue +++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionXPath2.vue @@ -2,7 +2,7 @@
- diff --git a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue index 5318d26e01..be73f0e974 100644 --- a/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue +++ b/frontend/src/business/components/api/definition/components/case/ApiCaseList.vue @@ -222,7 +222,9 @@ } this.result = this.$post("/api/testcase/list", this.condition, response => { - this.apiCaseList = response.data; + if(response.data){ + this.apiCaseList = response.data; + } this.apiCaseList.forEach(apiCase => { if (apiCase.tags && apiCase.tags.length > 0) { apiCase.tags = JSON.parse(apiCase.tags); @@ -236,7 +238,7 @@ } }) - if (!this.useEnvironment && this.apiCaseList[0].request && this.apiCaseList[0].request.useEnvironment) { + if (!this.useEnvironment && this.apiCaseList[0] && this.apiCaseList[0].request && this.apiCaseList[0].request.useEnvironment) { this.useEnvironment = this.apiCaseList[0].request.useEnvironment; this.environment = this.useEnvironment; } diff --git a/frontend/src/business/components/api/definition/components/import/ApiImport.vue b/frontend/src/business/components/api/definition/components/import/ApiImport.vue index 9d55688bb7..4a21594921 100644 --- a/frontend/src/business/components/api/definition/components/import/ApiImport.vue +++ b/frontend/src/business/components/api/definition/components/import/ApiImport.vue @@ -1,6 +1,7 @@