diff --git a/frontend/src/business/components/settings/organization/components/ZentaoSetting.vue b/frontend/src/business/components/settings/organization/components/ZentaoSetting.vue
index 64f9b5205f..512ac51e8f 100644
--- a/frontend/src/business/components/settings/organization/components/ZentaoSetting.vue
+++ b/frontend/src/business/components/settings/organization/components/ZentaoSetting.vue
@@ -10,6 +10,9 @@
+
+
+
@@ -63,7 +66,12 @@ export default {
required: true,
message: this.$t('organization.integration.input_app_key'),
trigger: ['change', 'blur']
- }
+ },
+ url: {
+ required: true,
+ message: this.$t('organization.integration.input_zentao_url'),
+ trigger: ['change', 'blur']
+ },
},
}
},
@@ -71,12 +79,16 @@ export default {
save() {
this.$refs['form'].validate(valid => {
if (valid) {
-
+ let formatUrl = this.form.url.trim();
+ if (!formatUrl.endsWith('/')) {
+ formatUrl = formatUrl + '/';
+ }
const {lastOrganizationId} = getCurrentUser();
let param = {};
let auth = {
account: this.form.account,
password: this.form.password,
+ url: formatUrl,
};
param.organizationId = lastOrganizationId;
param.platform = ZEN_TAO;
@@ -106,6 +118,7 @@ export default {
let config = JSON.parse(data.configuration);
this.$set(this.form, 'account', config.account);
this.$set(this.form, 'password', config.password);
+ this.$set(this.form, 'url', config.url);
} else {
this.clear();
}
@@ -114,19 +127,26 @@ export default {
clear() {
this.$set(this.form, 'account', '');
this.$set(this.form, 'password', '');
+ this.$set(this.form, 'url', '');
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
},
testConnection() {
- if (this.form.account && this.form.password) {
- this.$parent.result = this.$get("issues/auth/" + ZEN_TAO, () => {
- this.$success(this.$t('organization.integration.verified'));
- });
- } else {
- this.$warning(this.$t('organization.integration.not_integrated'));
- return false;
- }
+ this.$refs['form'].validate(valid => {
+ if (valid) {
+ if (this.form.account && this.form.password) {
+ this.$parent.result = this.$get("issues/auth/" + ZEN_TAO, () => {
+ this.$success(this.$t('organization.integration.verified'));
+ });
+ } else {
+ this.$warning(this.$t('organization.integration.not_integrated'));
+ return false;
+ }
+ } else {
+ return false;
+ }
+ })
},
cancelIntegration() {
if (this.form.account && this.form.password) {
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 2fbdc80cc1..55284b52e2 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -262,6 +262,8 @@ export default {
input_app_key: 'Please enter the key',
input_jira_url: 'Please enter Jira address, for example: https://metersphere.atlassian.net/',
input_jira_issuetype: 'Please enter the question type',
+ zentao_url: 'Zentao url',
+ input_zentao_url: 'Please enter Zentao address, for example: http://xx.xx.xx.xx/zentao/',
use_tip: 'Usage guidelines:',
use_tip_tapd: 'Basic Auth account information is queried in "Company Management-Security and Integration-Open Platform"',
use_tip_jira: 'Jira software server authentication information is account password, Jira software cloud authentication information is account + token (account settings-security-create API token)',
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index b77911f571..bb7f14c105 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -262,6 +262,8 @@ export default {
input_app_key: '请输入密钥',
input_jira_url: '请输入Jira地址,例:https://metersphere.atlassian.net/',
input_jira_issuetype: '请输入问题类型',
+ zentao_url: 'Zentao 地址',
+ input_zentao_url: '请输入Zentao地址,例:http://xx.xx.xx.xx/zentao/',
use_tip: '使用指引:',
use_tip_tapd: 'Tapd Basic Auth 账号信息在"公司管理-安全与集成-开放平台"中查询',
use_tip_jira: 'Jira software server 认证信息为 账号密码,Jira software cloud 认证信息为 账号+令牌(账户设置-安全-创建API令牌)',
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 43cc46c469..847aed50d8 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -264,6 +264,8 @@ export default {
input_app_key: '請輸入密鑰',
input_jira_url: '請輸入Jira地址,例:https://metersphere.atlassian.net/',
input_jira_issuetype: '請輸入問題類型',
+ zentao_url: 'Zentao 地址',
+ input_zentao_url: '請輸入Zentao地址,例:http://xx.xx.xx.xx/zentao/',
use_tip: '使用指引:',
use_tip_tapd: 'Tapd Basic Auth 賬號信息在"公司管理-安全與集成-開放平臺"中查詢',
use_tip_jira: 'Jira software server 認證信息為 賬號密碼,Jira software cloud 認證信息為 賬號+令牌(賬戶設置-安全-創建API令牌)',