From bbfb7987a2c46455cb32770f5e9558cc7fd68c54 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 17 Dec 2020 18:48:04 +0800 Subject: [PATCH 01/13] =?UTF-8?q?refactor:=20=E8=AE=BE=E7=BD=AElimit?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=A4=9A=E4=B8=AAjob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 2f4f76c93a..2903c46f39 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 2f4f76c93afa7b62b1d73fa90e73eec948a6ef3f +Subproject commit 2903c46f39c11b1238e6e6b30a77565472069cda From 4eb155362e7a30dd35c108441769c61bf143fe04 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 17 Dec 2020 18:54:20 +0800 Subject: [PATCH 02/13] =?UTF-8?q?refactor:=20=E8=AE=BE=E7=BD=AElimit?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=A4=9A=E4=B8=AAjob?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/metersphere/xpack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index 2903c46f39..efb49c9b4b 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit 2903c46f39c11b1238e6e6b30a77565472069cda +Subproject commit efb49c9b4be136ce48e9550dc9c8a2975d9f4d7f From f0d45a9aa0e381ccf0a7ed1f3b05824f80f6f009 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 17 Dec 2020 19:00:39 +0800 Subject: [PATCH 03/13] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E7=BB=84=E4=BB=B6=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ApiDefinitionExecResultMapper.java | 1 - .../api/automation/scenario/ApiComponent.vue | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java index 823aaa146a..d29f447b44 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ApiDefinitionExecResultMapper.java @@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; -import org.apache.ibatis.annotations.Param; public interface ApiDefinitionExecResultMapper { long countByExample(ApiDefinitionExecResultExample example); diff --git a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue index 7e5a170b91..928eafd66a 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiComponent.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiComponent.vue @@ -134,12 +134,29 @@ this.request.requestResult = requestResult; this.request.id = response.data.id; this.reload(); + this.sort(); } else { this.request.referenced = "Deleted"; } }) } }, + recursiveSorting(arr) { + for (let i in arr) { + arr[i].index = Number(i) + 1; + if (arr[i].hashTree != undefined && arr[i].hashTree.length > 0) { + this.recursiveSorting(arr[i].hashTree); + } + } + }, + sort() { + for (let i in this.request.hashTree) { + this.request.hashTree[i].index = Number(i) + 1; + if (this.request.hashTree[i].hashTree != undefined && this.request.hashTree[i].hashTree.length > 0) { + this.recursiveSorting(this.request.hashTree[i].hashTree); + } + } + }, active(item) { item.active = !item.active; this.reload(); From 97e5549bc1c4e42b248fe4d9f268387c31460295 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 17 Dec 2020 19:27:01 +0800 Subject: [PATCH 04/13] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/request/processors/MsJSR223Processor.java | 7 ++++++- .../request/processors/post/MsJSR223PostProcessor.java | 7 ++++++- .../request/processors/pre/MsJSR223PreProcessor.java | 7 ++++++- backend/src/main/java/io/metersphere/xpack | 2 +- .../business/components/api/automation/scenario/AddTag.vue | 6 ++++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/MsJSR223Processor.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/MsJSR223Processor.java index da6773894a..880b20fb13 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/MsJSR223Processor.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/MsJSR223Processor.java @@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig; import lombok.Data; import lombok.EqualsAndHashCode; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.jmeter.protocol.java.sampler.JSR223Sampler; import org.apache.jmeter.save.SaveService; import org.apache.jmeter.testelement.TestElement; @@ -32,7 +33,11 @@ public class MsJSR223Processor extends MsTestElement { } JSR223Sampler processor = new JSR223Sampler(); processor.setEnabled(true); - processor.setName(this.getName() + "JSR223Processor"); + if (StringUtils.isNotEmpty(this.getName())) { + processor.setName(this.getName()); + } else { + processor.setName("JSR223Processor"); + } processor.setProperty(TestElement.TEST_CLASS, JSR223Sampler.class.getName()); processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI")); processor.setProperty("cacheKey", "true"); diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java index 08ac2e12c1..4a922577da 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/post/MsJSR223PostProcessor.java @@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig; import lombok.Data; import lombok.EqualsAndHashCode; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.jmeter.extractor.JSR223PostProcessor; import org.apache.jmeter.save.SaveService; import org.apache.jmeter.testelement.TestElement; @@ -33,7 +34,11 @@ public class MsJSR223PostProcessor extends MsTestElement { } JSR223PostProcessor processor = new JSR223PostProcessor(); processor.setEnabled(true); - processor.setName(this.getName() + "JSR223PostProcessor"); + if (StringUtils.isNotEmpty(this.getName())) { + processor.setName(this.getName()); + } else { + processor.setName("JSR223PostProcessor"); + } processor.setProperty(TestElement.TEST_CLASS, JSR223PostProcessor.class.getName()); processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI")); processor.setProperty("cacheKey", "true"); diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/pre/MsJSR223PreProcessor.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/pre/MsJSR223PreProcessor.java index 7afd64dfc2..acea42c0e1 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/pre/MsJSR223PreProcessor.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/processors/pre/MsJSR223PreProcessor.java @@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig; import lombok.Data; import lombok.EqualsAndHashCode; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.jmeter.modifiers.JSR223PreProcessor; import org.apache.jmeter.save.SaveService; import org.apache.jmeter.testelement.TestElement; @@ -32,7 +33,11 @@ public class MsJSR223PreProcessor extends MsTestElement { } JSR223PreProcessor processor = new JSR223PreProcessor(); processor.setEnabled(true); - processor.setName(this.getName() + "JSR223PreProcessor"); + if (StringUtils.isNotEmpty(this.getName())) { + processor.setName(this.getName()); + } else { + processor.setName("JSR223PreProcessor"); + } processor.setProperty(TestElement.TEST_CLASS, JSR223PreProcessor.class.getName()); processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI")); processor.setProperty("cacheKey", "true"); diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index efb49c9b4b..61397c1672 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit efb49c9b4be136ce48e9550dc9c8a2975d9f4d7f +Subproject commit 61397c16728a63493507679f7e0940d9099f337f diff --git a/frontend/src/business/components/api/automation/scenario/AddTag.vue b/frontend/src/business/components/api/automation/scenario/AddTag.vue index a3e20b71bd..f9c073820e 100644 --- a/frontend/src/business/components/api/automation/scenario/AddTag.vue +++ b/frontend/src/business/components/api/automation/scenario/AddTag.vue @@ -38,12 +38,13 @@