fix(项目设置): 自定义代码片段测试时报错
--bug=1009212 --user=lyh 自定义代码片段测试时SQL报错 https://www.tapd.cn/55049933/s/1086695
This commit is contained in:
parent
e95839d8cc
commit
4807ccd91b
|
@ -116,6 +116,7 @@ public class CustomFunctionService {
|
|||
}
|
||||
|
||||
public MsExecResponseDTO run(RunDefinitionRequest request) {
|
||||
request.setDebug(true);
|
||||
return apiDefinitionService.run(request, new LinkedList<>());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,27 @@ export default {
|
|||
this.$emit('runRefresh', data);
|
||||
}
|
||||
},
|
||||
onDebugMessage(e) {
|
||||
if (e.data && e.data.startsWith("result_")) {
|
||||
try {
|
||||
let data = e.data.substring(7);
|
||||
this.websocket.close();
|
||||
this.$emit('runRefresh', JSON.parse(data));
|
||||
} catch (e) {
|
||||
this.websocket.close();
|
||||
this.$emit('runRefresh', "");
|
||||
}
|
||||
}
|
||||
},
|
||||
debugSocket() {
|
||||
let protocol = "ws://";
|
||||
if (window.location.protocol === 'https:') {
|
||||
protocol = "wss://";
|
||||
}
|
||||
const uri = protocol + window.location.host + "/ws/" + this.reportId;
|
||||
this.websocket = new WebSocket(uri);
|
||||
this.websocket.onmessage = this.onDebugMessage;
|
||||
},
|
||||
sort(stepArray) {
|
||||
if (stepArray) {
|
||||
for (let i in stepArray) {
|
||||
|
@ -94,7 +115,7 @@ export default {
|
|||
reqObj.reportId = this.reportId;
|
||||
this.$post(url, reqObj, res => {
|
||||
this.requestResult = res.data;
|
||||
this.initWebSocket();
|
||||
this.debugSocket();
|
||||
}, () => {
|
||||
this.$emit('errorRefresh', {});
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue