fix(接口自动化) 插件步骤,另存为接口定义控制

--bug=1006746 --user=赵勇 【接口自动化】插件步骤,另存为接口定义,报500 https://www.tapd.cn/55049933/s/1048552
This commit is contained in:
fit2-zhao 2021-09-18 17:16:46 +08:00 committed by fit2-zhao
parent 387577cd02
commit 38766d271c
4 changed files with 8 additions and 3 deletions

View File

@ -299,7 +299,7 @@ public class ApiDefinitionService {
private void checkNameExist(SaveApiDefinitionRequest request) {
ApiDefinitionExample example = new ApiDefinitionExample();
if (request.getProtocol().equals(RequestType.HTTP)) {
if (StringUtils.isNotEmpty(request.getProtocol()) && request.getProtocol().equals(RequestType.HTTP)) {
ApiDefinitionExample.Criteria criteria = example.createCriteria();
criteria.andMethodEqualTo(request.getMethod()).andStatusNotEqualTo("Trash")
.andProtocolEqualTo(request.getProtocol()).andPathEqualTo(request.getPath())

View File

@ -889,7 +889,11 @@ export default {
},
fabClick() {
if (this.operatingElements && this.operatingElements.length < 1) {
this.$info("引用的场景或接口无法添加配置");
if(this.selectedTreeNode && this.selectedTreeNode.referenced === 'REF' || this.selectedTreeNode.disabled) {
this.$warning("引用的场景步骤及子步骤都无法添加其他步骤");
}else{
this.$warning("当前步骤下不能添加其他步骤");
}
}
},
addComponent(type, plugin) {

View File

@ -24,6 +24,7 @@ export function STEP() {
['MaxSamplerProxy', getDefaultSamplerMenu()],
['GenericController', getAll()],
['AllSamplerProxy', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "Sampler", "AbstractSampler"]],
['DEFINITION', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler"]],
['AllCanExecType', ["HTTPSamplerProxy", "DubboSampler", "JDBCSampler", "TCPSampler", "JSR223Processor", "AbstractSampler"]]]);
return map
}

View File

@ -42,7 +42,7 @@ export default {
}
},
mounted() {
this.allSamplers = this.filter.get('AllSamplerProxy')
this.allSamplers = this.filter.get('DEFINITION');
},
methods: {
handleCommand(cmd) {