diff --git a/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue b/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue index a299273077..67eb8aa48f 100644 --- a/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue +++ b/frontend/src/business/components/api/test/components/environment/EnvironmentHttpConfig.vue @@ -316,8 +316,16 @@ export default { domain: this.condition.domain, port: this.condition.port, time: new Date().getTime(), description: this.condition.description }; if (this.condition.type === "PATH") { + if (this.pathDetails.name === '') { + this.$warning(this.$t('api_test.environment.path_warning')); + return; + } obj.details = [JSON.parse(JSON.stringify(this.pathDetails))]; } else { + if (this.condition.details.length === 0) { + this.$warning(this.$t('api_test.environment.module_warning')); + return; + } obj.details = this.condition.details ? JSON.parse(JSON.stringify(this.condition.details)) : this.condition.details; } this.httpConfig.conditions.unshift(obj); diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 5eff777a39..d071a227bb 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -1389,7 +1389,9 @@ export default { request_timeout: "Request Timeout", response_timeout: "Response Timeout", repeat_warning: "The domain name whose activation condition is'None' already exists!", - copy_warning: "Domain names whose enabling conditions are'none' do not support copying!" + copy_warning: "Domain names whose enabling conditions are'none' do not support copying!", + path_warning: "The path cannot be empty", + module_warning: "The path cannot be empty" }, scenario: { id: "Scenario ID", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 45b7618c39..457af5b0ba 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -1394,7 +1394,9 @@ export default { request_timeout: "链接超时", response_timeout: "响应超时", repeat_warning: "启用条件为 '无' 的域名已经存在!", - copy_warning: "启用条件为 '无' 的域名不支持复制!" + copy_warning: "启用条件为 '无' 的域名不支持复制!", + path_warning: "路径不能为空", + module_warning: "模块不能为空" }, scenario: { id: "场景ID", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index c16da04a10..4d12cd3ad4 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -1394,7 +1394,9 @@ export default { request_timeout: "鏈接超時", response_timeout: "響應超時", repeat_warning: "啟用條件為 '無' 的域名已經存在!", - copy_warning: "啟用條件為 '無' 的域名不支持複製!" + copy_warning: "啟用條件為 '無' 的域名不支持複製!", + path_warning: "路徑不能為空", + module_warning: "模塊不能為空" }, scenario: { id: "場景ID",