From a92db96844aeb23668e1c18b6ca5128e88d3409a Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 7 Sep 2020 13:42:21 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=8A=A0=E5=BC=BAhost=E5=88=97=E8=A1=A8=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/test/ApiTestConfig.vue | 534 +++++++++--------- .../api/test/components/ApiHostTable.vue | 3 + .../business/components/api/test/model/JMX.js | 4 +- .../api/test/model/ScenarioModel.js | 4 +- 4 files changed, 274 insertions(+), 271 deletions(-) diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index a7b46b108a..0eb893a484 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -65,300 +65,300 @@ diff --git a/frontend/src/business/components/api/test/components/ApiHostTable.vue b/frontend/src/business/components/api/test/components/ApiHostTable.vue index 5b804f5a0e..7601c9315e 100644 --- a/frontend/src/business/components/api/test/components/ApiHostTable.vue +++ b/frontend/src/business/components/api/test/components/ApiHostTable.vue @@ -123,6 +123,9 @@ validateDomain(domain) { let url = {}; try { + if (!domain.startsWith("http") || !domain.startsWith("https")) { + domain += "http://"; + } url = new URL(domain); } catch (e) { this.$warning(this.$t('load_test.input_domain')); diff --git a/frontend/src/business/components/api/test/model/JMX.js b/frontend/src/business/components/api/test/model/JMX.js index ea90014e2e..90cd6cc076 100644 --- a/frontend/src/business/components/api/test/model/JMX.js +++ b/frontend/src/business/components/api/test/model/JMX.js @@ -504,8 +504,8 @@ export class DNSCacheManager extends DefaultTestElement { let collectionPropHosts = this.collectionProp('DNSCacheManager.hosts'); hosts.forEach(host => { - let elementProp = collectionPropHosts.elementProp('', 'StaticHost'); - if (host && host.domain.trim() === domain.trim()) { + let elementProp = collectionPropHosts.elementProp(host.domain, 'StaticHost'); + if (host && host.domain.trim().indexOf(domain.trim()) != -1) { elementProp.stringProp('StaticHost.Name', host.domain); elementProp.stringProp('StaticHost.Address', host.ip); } diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index 511c3c8661..f84ca536de 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -948,8 +948,8 @@ class JMXGenerator { let name = request.name + " DNSCacheManager"; let hosts = JSON.parse(request.environment.hosts); if (hosts.length > 0) { - let domain = request.environment.protocol + "://" + request.environment.domain; - threadGroup.put(new DNSCacheManager(name, domain, hosts)); + //let domain = request.environment.protocol + "://" + request.environment.domain; + threadGroup.put(new DNSCacheManager(name, request.environment.domain, hosts)); } } } From 72efb0e1ff77ef6708ca176284df413fe73bd00f Mon Sep 17 00:00:00 2001 From: BugKing Date: Mon, 7 Sep 2020 15:34:52 +0800 Subject: [PATCH 2/5] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 207963ad02..740ad37ff1 100755 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ MeterSphere 是一站式的开源企业级持续测试平台,涵盖测试跟 ## UI 展示 -![UI](https://metersphere.io/images/screenshot/ss01.png) +![UI](https://metersphere.io/images/screenshot/) ## 在线体验 - 环境地址:https://demo.metersphere.com/ From 3563c36eccfce6d458d470513df8fa9fda7f121b Mon Sep 17 00:00:00 2001 From: BugKing Date: Mon, 7 Sep 2020 15:35:40 +0800 Subject: [PATCH 3/5] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 740ad37ff1..207963ad02 100755 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ MeterSphere 是一站式的开源企业级持续测试平台,涵盖测试跟 ## UI 展示 -![UI](https://metersphere.io/images/screenshot/) +![UI](https://metersphere.io/images/screenshot/ss01.png) ## 在线体验 - 环境地址:https://demo.metersphere.com/ From 2b462c4f1c3d43ea90bc352370ed87274228c4ae Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 7 Sep 2020 15:59:44 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8Dbody=E5=86=85=E5=AE=B9=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/test/model/ScenarioModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index a5566121f1..65257f2cec 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -550,7 +550,7 @@ export class Body extends BaseConfig { export class KeyValue extends BaseConfig { constructor() { - let options, key, value, type, enable, uuid; + let options, key, value, type, enable =true, uuid; if (arguments.length === 1) { options = arguments[0]; } @@ -1038,7 +1038,7 @@ class JMXGenerator { this.addRequestBodyFile(httpSamplerProxy, request, testId); } else { httpSamplerProxy.boolProp('HTTPSampler.postBodyRaw', true); - body.push({name: '', value: request.body.raw, encode: false}); + body.push({name: '', value: request.body.raw, encode: false,enable:true}); } httpSamplerProxy.add(new HTTPSamplerArguments(body)); From ab4be0a23bc03bd58d4dc602a9e034020058470c Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 7 Sep 2020 16:11:06 +0800 Subject: [PATCH 5/5] =?UTF-8?q?style(=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95)?= =?UTF-8?q?:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/test/model/ScenarioModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index 65257f2cec..60c20baa78 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -550,7 +550,7 @@ export class Body extends BaseConfig { export class KeyValue extends BaseConfig { constructor() { - let options, key, value, type, enable =true, uuid; + let options, key, value, type, enable, uuid; if (arguments.length === 1) { options = arguments[0]; } @@ -1038,7 +1038,7 @@ class JMXGenerator { this.addRequestBodyFile(httpSamplerProxy, request, testId); } else { httpSamplerProxy.boolProp('HTTPSampler.postBodyRaw', true); - body.push({name: '', value: request.body.raw, encode: false,enable:true}); + body.push({name: '', value: request.body.raw, encode: false, enable: true}); } httpSamplerProxy.add(new HTTPSamplerArguments(body));