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 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 b67de06704..145037cf7c 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -695,14 +695,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 : ''))); } @@ -721,7 +721,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 += '&'; } } 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..fd8b5b3603 100644 --- a/frontend/src/business/components/settings/SettingMenu.vue +++ b/frontend/src/business/components/settings/SettingMenu.vue @@ -21,6 +21,8 @@ {{$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 new file mode 100644 index 0000000000..ab6ea80e78 --- /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..911c6c5355 --- /dev/null +++ b/frontend/src/business/components/settings/organization/ServiceIntegration.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 535d5572e8..e4713201c7 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -173,8 +173,18 @@ export default { special_characters_are_not_supported: 'Incorrect format (special characters are not supported and cannot end with \'-\')', none: 'None Organization', select: 'Select Organization', - - + service_integration: 'Service integration', + defect_manage: 'Defect management platform', + select_defect_platform: 'Please select the defect management platform to be integrated:', + basic_auth_info: 'Basic Auth account information:', + api_account: 'API account', + api_password: 'API password', + input_api_account: 'please enter account', + input_api_password: 'Please enter password', + use_tip: 'Usage guidelines:', + use_tip_one: 'Basic Auth account information is queried in "Company Management-Security and Integration-Open Platform"', + use_tip_two: 'After saving the Basic Auth account information, you need to manually associate the ID/key in the Metersphere project', + link_the_project_now: 'Link the project now', }, project: { name: 'Project name', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 6bce5031ee..016cdfe8cf 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -174,6 +174,18 @@ export default { none: '无组织', select: '选择组织', delete_warning: '删除该组织将同步删除该组织下所有相关工作空间和相关工作空间下的所有项目,以及项目中的所有用例、接口测试、性能测试等,确定要删除吗?', + service_integration: '服务集成', + defect_manage: '缺陷管理平台', + select_defect_platform: '请选择要集成的缺陷管理平台:', + basic_auth_info: 'Basic Auth 账号信息:', + api_account: 'API 账号', + api_password: 'API 口令', + input_api_account: '请输入账号', + input_api_password: '请输入口令', + use_tip: '使用指引:', + use_tip_one: 'Basic Auth 账号信息在"公司管理-安全与集成-开放平台"中查询', + use_tip_two: '保存 Basic Auth 账号信息后,需要在 Metersphere 项目中手动关联 ID/key', + link_the_project_now: '马上关联项目', }, project: { recent: '最近的项目', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index eac1411442..3038392d69 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -172,7 +172,18 @@ export default { none: '無組織', select: '選擇組織', delete_warning: '删除该组织将同步删除该组织下所有相关工作空间和相关工作空间下的所有项目,以及项目中的所有用例、接口测试、性能测试等,确定要删除吗?', - + service_integration: '服務集成', + defect_manage: '缺陷管理平台', + select_defect_platform: '請選擇要集成的缺陷管理平台:', + basic_auth_info: 'Basic Auth 賬號信息:', + api_account: 'API 賬號', + api_password: 'API 口令', + input_api_account: '請輸入賬號', + input_api_password: '請輸入口令', + use_tip: '使用指引:', + use_tip_one: 'Basic Auth 賬號信息在"公司管理-安全與集成-開放平台"中查詢', + use_tip_two: '保存 Basic Auth 賬號信息後,需要在 Metersphere 項目中手動關聯 ID/key', + link_the_project_now: '馬上關聯項目', }, project: { recent: '最近的項目',