From 2646dc94b49609efc6137871831a058e811bc1dd Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 10 Aug 2020 14:17:16 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?):=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E4=B8=8B=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E6=8C=89=E7=85=A7ID=E5=AD=97=E6=AE=B5=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 9 ++++++++- .../track/plan/view/comonents/TestPlanTestCaseList.vue | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index b29d44d1c3..d40ee5c806 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -185,7 +185,14 @@ order by - test_plan_test_case.${order.name} ${order.type} + + + test_case.num ${order.type} + + + test_plan_test_case.${order.name} ${order.type} + + diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue index ba84c3c3ba..25fa17cb0c 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue @@ -55,6 +55,7 @@ @@ -497,6 +498,10 @@ this.initTableData(); }, sort(column) { + // 每次只对一个字段排序 + if (this.condition.orders) { + this.condition.orders = []; + } _sort(column, this.condition); this.initTableData(); }, From f247807c3d16dd8a65f4b538dd23ac97674047ad Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 10 Aug 2020 14:26:51 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?):=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=92=8C=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E5=8F=AF=E4=BB=A5=E6=A0=B9=E6=8D=AE=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=88=96=E8=80=85ID=E6=90=9C=E7=B4=A2=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml | 2 +- .../metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 1ae50558f5..fd4af9a938 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -154,7 +154,7 @@ - and test_case.name like CONCAT('%', #{request.name},'%') + and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%')) and test_case.node_id in diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index d40ee5c806..cc07abc4bf 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -126,7 +126,7 @@ - and test_case.name like CONCAT('%', #{request.name},'%') + and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%')) and test_case.id = #{request.id} From da226cf76e95df26821f3a3e568a719f0397a53d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 10 Aug 2020 14:59:20 +0800 Subject: [PATCH 03/10] =?UTF-8?q?feat:=20=E6=98=BE=E7=A4=BAJmeter=E7=9A=84?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E5=87=BD=E6=95=B0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/test/components/ApiKeyValue.vue | 5 ++- .../api/test/model/ScenarioModel.js | 4 ++ frontend/src/common/js/constants.js | 38 +++++++++++++++++++ frontend/src/i18n/en-US.js | 7 ++-- frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 7 ++-- 6 files changed, 54 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/api/test/components/ApiKeyValue.vue b/frontend/src/business/components/api/test/components/ApiKeyValue.vue index 4767c331d7..d3632a17d2 100644 --- a/frontend/src/business/components/api/test/components/ApiKeyValue.vue +++ b/frontend/src/business/components/api/test/components/ApiKeyValue.vue @@ -76,6 +76,7 @@

{{ $t('api_test.request.parameters_filter_example') }}:@string(10) | md5 | substr: 1, 3

{{ $t('api_test.request.parameters_filter_example') }}:@integer(1, 5) | concat:_metersphere

+

{{ $t('api_test.request.parameters_filter_tips') }}

@@ -84,7 +85,7 @@ + + diff --git a/frontend/src/business/components/settings/organization/ServiceIntegration.vue b/frontend/src/business/components/settings/organization/ServiceIntegration.vue new file mode 100644 index 0000000000..a4ba653d67 --- /dev/null +++ b/frontend/src/business/components/settings/organization/ServiceIntegration.vue @@ -0,0 +1,30 @@ + + + + + From c8e6b5106fc2302dfde518b176d83c6ca3a61297 Mon Sep 17 00:00:00 2001 From: q4speed Date: Mon, 10 Aug 2020 17:04:34 +0800 Subject: [PATCH 05/10] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/components/api/test/model/JMX.js | 28 ++++++++----------- .../api/test/model/ScenarioModel.js | 8 +++--- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/frontend/src/business/components/api/test/model/JMX.js b/frontend/src/business/components/api/test/model/JMX.js index 952eb15b62..2b62154c07 100644 --- a/frontend/src/business/components/api/test/model/JMX.js +++ b/frontend/src/business/components/api/test/model/JMX.js @@ -275,29 +275,23 @@ export class DubboSample extends DefaultTestElement { } export class HTTPSamplerProxy extends DefaultTestElement { - constructor(testName, request) { + constructor(testName, options = {}) { super('HTTPSamplerProxy', 'HttpTestSampleGui', 'HTTPSamplerProxy', testName); - this.request = request || {}; - if (request.useEnvironment) { - this.stringProp("HTTPSampler.domain", request.domain); - this.stringProp("HTTPSampler.protocol", request.protocol); - this.stringProp("HTTPSampler.path", this.request.path); - } else { - this.stringProp("HTTPSampler.domain", this.request.hostname); - this.stringProp("HTTPSampler.protocol", this.request.protocol.split(":")[0]); - this.stringProp("HTTPSampler.path", this.request.pathname); - } - this.stringProp("HTTPSampler.method", this.request.method); - this.stringProp("HTTPSampler.contentEncoding", this.request.encoding, "UTF-8"); - if (!this.request.port) { + this.stringProp("HTTPSampler.domain", options.domain); + this.stringProp("HTTPSampler.protocol", options.protocol); + this.stringProp("HTTPSampler.path", options.path); + + this.stringProp("HTTPSampler.method", options.method); + this.stringProp("HTTPSampler.contentEncoding", options.encoding, "UTF-8"); + if (!options.port) { this.stringProp("HTTPSampler.port", ""); } else { - this.stringProp("HTTPSampler.port", this.request.port); + this.stringProp("HTTPSampler.port", options.port); } - this.boolProp("HTTPSampler.follow_redirects", this.request.follow, true); - this.boolProp("HTTPSampler.use_keepalive", this.request.keepalive, true); + this.boolProp("HTTPSampler.follow_redirects", options.follow, true); + this.boolProp("HTTPSampler.use_keepalive", options.keepalive, true); } } diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index d4f6f75585..e02948cd16 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -691,14 +691,14 @@ class JMXHttpRequest { request.url = 'http://' + request.url; } let url = new URL(request.url); - this.hostname = decodeURIComponent(url.hostname); + this.domain = decodeURIComponent(url.hostname); this.port = url.port; this.protocol = url.protocol.split(":")[0]; - this.pathname = this.getPostQueryParameters(request, decodeURIComponent(url.pathname)); + this.path = this.getPostQueryParameters(request, decodeURIComponent(url.pathname)); } else { + this.domain = environment.domain; this.port = environment.port; this.protocol = environment.protocol; - this.domain = environment.domain; let url = new URL(environment.protocol + "://" + environment.socket); this.path = this.getPostQueryParameters(request, decodeURIComponent(url.pathname + (request.path ? request.path : ''))); } @@ -717,7 +717,7 @@ class JMXHttpRequest { for (let i = 0; i < parameters.length; i++) { let parameter = parameters[i]; path += (parameter.name + '=' + parameter.value); - if (i != parameters.length - 1) { + if (i !== parameters.length - 1) { path += '&'; } } From 09d1a1822e787a85a72e57a2396fefb487b9cf74 Mon Sep 17 00:00:00 2001 From: q4speed Date: Mon, 10 Aug 2020 17:06:05 +0800 Subject: [PATCH 06/10] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=AF=B9Jmeter?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E5=87=BD=E6=95=B0=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/pom.xml b/backend/pom.xml index 8e38b46fa9..bdd4e17897 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -158,6 +158,12 @@ + + org.apache.jmeter + ApacheJMeter_functions + ${jmeter.version} + + org.apache.dubbo From 6e0f0bdd1af4685cfe511df3d9a1d391b9ea858f Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 10 Aug 2020 17:58:05 +0800 Subject: [PATCH 07/10] refactor: i18n --- .../components/settings/SettingMenu.vue | 2 +- .../organization/DefectManagement.vue | 26 +++++++++---------- .../organization/ServiceIntegration.vue | 2 +- frontend/src/i18n/en-US.js | 14 ++++++++-- frontend/src/i18n/zh-CN.js | 12 +++++++++ frontend/src/i18n/zh-TW.js | 13 +++++++++- 6 files changed, 51 insertions(+), 18 deletions(-) diff --git a/frontend/src/business/components/settings/SettingMenu.vue b/frontend/src/business/components/settings/SettingMenu.vue index 2669d52e4f..fd8b5b3603 100644 --- a/frontend/src/business/components/settings/SettingMenu.vue +++ b/frontend/src/business/components/settings/SettingMenu.vue @@ -21,7 +21,7 @@ {{$t('commons.workspace')}} - 服务集成 + {{$t('organization.service_integration')}} diff --git a/frontend/src/business/components/settings/organization/DefectManagement.vue b/frontend/src/business/components/settings/organization/DefectManagement.vue index 0ed4360aaf..ab6ea80e78 100644 --- a/frontend/src/business/components/settings/organization/DefectManagement.vue +++ b/frontend/src/business/components/settings/organization/DefectManagement.vue @@ -1,7 +1,7 @@