From 1007479e20500d640278c2f2e6266e0a3ac9abe0 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 10 Aug 2020 16:18:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=20=E7=BB=84=E7=BB=87=E8=8F=9C=E5=8D=95=E4=B8=8B=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=9C=8D=E5=8A=A1=E9=9B=86=E6=88=90=E5=AD=90=E8=8F=9C?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/router/router.js | 5 ++ .../components/settings/SettingMenu.vue | 2 + .../organization/DefectManagement.vue | 85 +++++++++++++++++++ .../organization/ServiceIntegration.vue | 30 +++++++ 4 files changed, 122 insertions(+) create mode 100644 frontend/src/business/components/settings/organization/DefectManagement.vue create mode 100644 frontend/src/business/components/settings/organization/ServiceIntegration.vue diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index 0ff12b5946..831b68821e 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -33,6 +33,7 @@ import TestTrack from "../../track/TestTrack"; import ApiReportList from "../../api/report/ApiReportList"; import axios from "axios"; import ApiKeys from "../../settings/personal/ApiKeys"; +import ServiceIntegration from "../../settings/organization/ServiceIntegration"; const requireContext = require.context('@/business/components/xpack/', true, /router\.js$/) @@ -70,6 +71,10 @@ const router = new VueRouter({ path: 'organizationworkspace', component: OrganizationWorkspace, }, + { + path: 'serviceintegration', + component: ServiceIntegration, + }, { path: 'personsetting', component: PersonSetting diff --git a/frontend/src/business/components/settings/SettingMenu.vue b/frontend/src/business/components/settings/SettingMenu.vue index cc3fd00952..2669d52e4f 100644 --- a/frontend/src/business/components/settings/SettingMenu.vue +++ b/frontend/src/business/components/settings/SettingMenu.vue @@ -21,6 +21,8 @@ {{$t('commons.workspace')}} + 服务集成 + diff --git a/frontend/src/business/components/settings/organization/DefectManagement.vue b/frontend/src/business/components/settings/organization/DefectManagement.vue new file mode 100644 index 0000000000..0ed4360aaf --- /dev/null +++ b/frontend/src/business/components/settings/organization/DefectManagement.vue @@ -0,0 +1,85 @@ + + + + + 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 2/4] =?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 3/4] =?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 4/4] 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 @@