fix(接口定义): 接口定义-快捷调试,只输入路径,接口地址会获取不到问题处理
This commit is contained in:
parent
4521b16ef3
commit
037d409ecc
|
@ -435,7 +435,7 @@ public class ApiAutomationService {
|
|||
env.setFullUrl(false);
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.equals(tr.getType(), "TCPSampler")) {
|
||||
} else if (StringUtils.equals(tr.getType(), "JDBCSampler") || StringUtils.equals(tr.getType(), "TCPSampler")) {
|
||||
env.getProjectIds().add(tr.getProjectId());
|
||||
}
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ public class ApiAutomationService {
|
|||
env.getProjectIds().add(http.getProjectId());
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.equals(tr.getType(), "TCPSampler")) {
|
||||
} else if (StringUtils.equals(tr.getType(), "JDBCSampler") || StringUtils.equals(tr.getType(), "TCPSampler")) {
|
||||
if (StringUtils.equals(tr.getRefType(), "CASE")) {
|
||||
ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = apiTestCaseService.get(tr.getId());
|
||||
env.getProjectIds().add(apiTestCaseWithBLOBs.getProjectId());
|
||||
|
@ -509,7 +509,7 @@ public class ApiAutomationService {
|
|||
env.getProjectIds().add(httpSamplerProxy.getProjectId());
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.equals(tr.getType(), "TCPSampler")) {
|
||||
} else if (StringUtils.equals(tr.getType(), "JDBCSampler") || StringUtils.equals(tr.getType(), "TCPSampler")) {
|
||||
env.getProjectIds().add(tr.getProjectId());
|
||||
}
|
||||
}
|
||||
|
@ -529,7 +529,6 @@ public class ApiAutomationService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public List<ApiScenarioWithBLOBs> getApiScenarios(List<String> ids) {
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
return extApiScenarioMapper.selectIds(ids);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9925f59ecdaed93a4365d83f8473d6788a233c4b
|
||||
Subproject commit cd0ea7de5f69a33830725e26e71e65b3345903fe
|
|
@ -725,9 +725,7 @@
|
|||
// let ids = [row.id];
|
||||
let param = {};
|
||||
this.buildBatchParam(param);
|
||||
if (param.ids && param.ids.length <= 0) {
|
||||
param.ids = [row.id];
|
||||
}
|
||||
param.ids = [row.id];
|
||||
this.$post('/api/automation/removeToGcByBatch/', param, () => {
|
||||
// this.$post('/api/automation/removeToGc/', ids, () => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
|
||||
</div>
|
||||
<!-- 加载用例 -->
|
||||
<ms-api-case-list @refreshModule="refreshModule" :loaded="false" ref="caseList"/>
|
||||
<ms-api-case-list :currentApi="debugForm" @refreshModule="refreshModule" :loaded="false" ref="caseList"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
|||
},
|
||||
urlChange() {
|
||||
if (!this.debugForm.url) return;
|
||||
let url = this.getURL(this.addProtocol(this.debugForm.url));
|
||||
let url = this.getURL(this.debugForm.url);
|
||||
if (url && url.pathname) {
|
||||
if (this.debugForm.url.indexOf('?') != -1) {
|
||||
this.debugForm.url = decodeURIComponent(this.debugForm.url.substr(0, this.debugForm.url.indexOf("?")));
|
||||
|
@ -223,14 +223,6 @@
|
|||
}
|
||||
|
||||
},
|
||||
addProtocol(url) {
|
||||
if (url) {
|
||||
if (!url.toLowerCase().startsWith("https") && !url.toLowerCase().startsWith("http")) {
|
||||
return "https://" + url;
|
||||
}
|
||||
}
|
||||
return url;
|
||||
},
|
||||
getURL(urlStr) {
|
||||
try {
|
||||
let url = new URL(urlStr);
|
||||
|
|
Loading…
Reference in New Issue