fix(项目管理): 修改环境设置中模块和路径匹配时模块和路径可以为空的缺陷
--bug=1010200 --user=王孝刚 【项目管理】github#9994,环境设置,建议模块和路径匹配时模块和路径不允许为空 https://www.tapd.cn/55049933/s/1103404
This commit is contained in:
parent
0f0af3ba27
commit
3b28d53d40
|
@ -316,8 +316,16 @@ export default {
|
||||||
domain: this.condition.domain, port: this.condition.port, time: new Date().getTime(), description: this.condition.description
|
domain: this.condition.domain, port: this.condition.port, time: new Date().getTime(), description: this.condition.description
|
||||||
};
|
};
|
||||||
if (this.condition.type === "PATH") {
|
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))];
|
obj.details = [JSON.parse(JSON.stringify(this.pathDetails))];
|
||||||
} else {
|
} 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;
|
obj.details = this.condition.details ? JSON.parse(JSON.stringify(this.condition.details)) : this.condition.details;
|
||||||
}
|
}
|
||||||
this.httpConfig.conditions.unshift(obj);
|
this.httpConfig.conditions.unshift(obj);
|
||||||
|
|
|
@ -1389,7 +1389,9 @@ export default {
|
||||||
request_timeout: "Request Timeout",
|
request_timeout: "Request Timeout",
|
||||||
response_timeout: "Response Timeout",
|
response_timeout: "Response Timeout",
|
||||||
repeat_warning: "The domain name whose activation condition is'None' already exists!",
|
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: {
|
scenario: {
|
||||||
id: "Scenario ID",
|
id: "Scenario ID",
|
||||||
|
|
|
@ -1394,7 +1394,9 @@ export default {
|
||||||
request_timeout: "链接超时",
|
request_timeout: "链接超时",
|
||||||
response_timeout: "响应超时",
|
response_timeout: "响应超时",
|
||||||
repeat_warning: "启用条件为 '无' 的域名已经存在!",
|
repeat_warning: "启用条件为 '无' 的域名已经存在!",
|
||||||
copy_warning: "启用条件为 '无' 的域名不支持复制!"
|
copy_warning: "启用条件为 '无' 的域名不支持复制!",
|
||||||
|
path_warning: "路径不能为空",
|
||||||
|
module_warning: "模块不能为空"
|
||||||
},
|
},
|
||||||
scenario: {
|
scenario: {
|
||||||
id: "场景ID",
|
id: "场景ID",
|
||||||
|
|
|
@ -1394,7 +1394,9 @@ export default {
|
||||||
request_timeout: "鏈接超時",
|
request_timeout: "鏈接超時",
|
||||||
response_timeout: "響應超時",
|
response_timeout: "響應超時",
|
||||||
repeat_warning: "啟用條件為 '無' 的域名已經存在!",
|
repeat_warning: "啟用條件為 '無' 的域名已經存在!",
|
||||||
copy_warning: "啟用條件為 '無' 的域名不支持複製!"
|
copy_warning: "啟用條件為 '無' 的域名不支持複製!",
|
||||||
|
path_warning: "路徑不能為空",
|
||||||
|
module_warning: "模塊不能為空"
|
||||||
},
|
},
|
||||||
scenario: {
|
scenario: {
|
||||||
id: "場景ID",
|
id: "場景ID",
|
||||||
|
|
Loading…
Reference in New Issue