fix: 单接口调试

This commit is contained in:
chenjianxing 2020-08-17 13:06:41 +08:00
parent 064304ba28
commit 263aba9b57
3 changed files with 6 additions and 5 deletions

View File

@ -132,7 +132,6 @@
LEFT JOIN user ON user.id = r.user_id
<where>
r.id = #{id}
AND r.status != 'Debug'
</where>
ORDER BY r.update_time DESC
</select>

@ -1 +1 @@
Subproject commit fadab72bb656a3a2644e43bf46783c1f6cd96d4f
Subproject commit 356bb744a72304067b9222cb0cb2be01d4ebff2a

View File

@ -1,7 +1,7 @@
<template>
<div class="request-form">
<component @runDebug="runDebug" :is="component" :is-read-only="isReadOnly" :request="request" :scenario="scenario"/>
<ms-scenario-results v-loading="debugReportLoading" v-if="isCompleted" :scenarios="isCompleted ? request.debugReport.scenarios : []"/>
<ms-request-result-tail v-loading="debugReportLoading" v-if="isCompleted" :request="request.debugRequestResult ? request.debugRequestResult : {responseResult: {}, subRequestResults: []}" :scenario-name="request.debugScenario ? request.debugScenario.name : ''"/>
</div>
</template>
@ -10,10 +10,11 @@ import {Request, RequestFactory, Scenario} from "../../model/ScenarioModel";
import MsApiHttpRequestForm from "./ApiHttpRequestForm";
import MsApiDubboRequestForm from "./ApiDubboRequestForm";
import MsScenarioResults from "../../../report/components/ScenarioResults";
import MsRequestResultTail from "../../../report/components/RequestResultTail";
export default {
name: "MsApiRequestForm",
components: {MsScenarioResults, MsApiDubboRequestForm, MsApiHttpRequestForm},
components: {MsRequestResultTail, MsScenarioResults, MsApiDubboRequestForm, MsApiHttpRequestForm},
props: {
scenario: Scenario,
request: Request,
@ -66,12 +67,13 @@ export default {
try {
res = JSON.parse(report.content);
} catch (e) {
console.log(report.content)
throw e;
}
if (res) {
this.debugReportLoading = false;
this.request.debugReport = res;
this.request.debugScenario = res.scenarios[0];
this.request.debugRequestResult = this.request.debugScenario.requestResults[0];
this.deleteReport(this.debugReportId)
} else {
setTimeout(this.getReport, 2000)