Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
d4f28df3b9
|
@ -1 +1 @@
|
|||
Subproject commit 1fe20ba15a7ca3fe9f77ddf866021e7c7dfe5969
|
||||
Subproject commit 61397c16728a63493507679f7e0940d9099f337f
|
|
@ -17,15 +17,21 @@
|
|||
|
||||
<el-col :span="5">
|
||||
<el-tooltip effect="dark" :content="request.responseResult.responseCode" placement="bottom" :open-delay="800">
|
||||
<div class="url" style="color: #5daf34">{{ request.responseResult.responseCode }}</div>
|
||||
<div style="color: #5daf34" v-if="request.success">{{ request.responseResult.responseCode }}</div>
|
||||
<div style="color: #FE6F71" v-else>{{ request.responseResult.responseCode }}</div>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
{{request.responseResult.responseTime}} ms
|
||||
<span v-if="request.success">
|
||||
{{request.responseResult.responseTime}} ms
|
||||
</span>
|
||||
<span style="color: #FE6F71" v-else>
|
||||
{{request.responseResult.responseTime}} ms
|
||||
</span>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2">
|
||||
<div class="success">
|
||||
<div>
|
||||
<el-tag size="mini" type="success" v-if="request.success">
|
||||
{{ $t('api_report.success') }}
|
||||
</el-tag>
|
||||
|
|
|
@ -8,33 +8,10 @@
|
|||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div class="name">{{request.name}}</div>
|
||||
<el-tooltip effect="dark" :content="request.url" placement="bottom" :open-delay="800">
|
||||
<div class="url">{{request.url}}</div>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
{{request.startTime | timestampFormatDate(true) }}
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="time">
|
||||
{{request.responseResult.responseTime}}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
{{request.error}}
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
{{assertion}}
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-tag size="mini" type="success" v-if="request.success">
|
||||
{{$t('api_report.success')}}
|
||||
</el-tag>
|
||||
<el-tag size="mini" type="danger" v-else>
|
||||
{{$t('api_report.fail')}}
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-collapse-transition>
|
||||
|
@ -52,7 +29,6 @@
|
|||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div v-else>
|
||||
<ms-request-metric :request="request"/>
|
||||
<ms-request-text v-if="isCodeEditAlive" :request="request"/>
|
||||
<br>
|
||||
<ms-response-text :request-type="requestType" v-if="isCodeEditAlive" :response="request.responseResult"/>
|
||||
|
|
|
@ -32,36 +32,40 @@
|
|||
methods: {
|
||||
setFiles(item, bodyUploadFiles, obj) {
|
||||
if (item.body) {
|
||||
item.body.kvs.forEach(param => {
|
||||
if (param.files) {
|
||||
param.files.forEach(item => {
|
||||
if (item.file) {
|
||||
if (!item.id) {
|
||||
let fileId = getUUID().substring(0, 12);
|
||||
item.name = item.file.name;
|
||||
item.id = fileId;
|
||||
if (item.body.kvs) {
|
||||
item.body.kvs.forEach(param => {
|
||||
if (param.files) {
|
||||
param.files.forEach(item => {
|
||||
if (item.file) {
|
||||
if (!item.id) {
|
||||
let fileId = getUUID().substring(0, 12);
|
||||
item.name = item.file.name;
|
||||
item.id = fileId;
|
||||
}
|
||||
obj.bodyUploadIds.push(item.id);
|
||||
bodyUploadFiles.push(item.file);
|
||||
}
|
||||
obj.bodyUploadIds.push(item.id);
|
||||
bodyUploadFiles.push(item.file);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
item.body.binary.forEach(param => {
|
||||
if (param.files) {
|
||||
param.files.forEach(item => {
|
||||
if (item.file) {
|
||||
if (!item.id) {
|
||||
let fileId = getUUID().substring(0, 12);
|
||||
item.name = item.file.name;
|
||||
item.id = fileId;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (item.body.binary) {
|
||||
item.body.binary.forEach(param => {
|
||||
if (param.files) {
|
||||
param.files.forEach(item => {
|
||||
if (item.file) {
|
||||
if (!item.id) {
|
||||
let fileId = getUUID().substring(0, 12);
|
||||
item.name = item.file.name;
|
||||
item.id = fileId;
|
||||
}
|
||||
obj.bodyUploadIds.push(item.id);
|
||||
bodyUploadFiles.push(item.file);
|
||||
}
|
||||
obj.bodyUploadIds.push(item.id);
|
||||
bodyUploadFiles.push(item.file);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
recursiveFile(arr, bodyUploadFiles, obj) {
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
</el-form>
|
||||
|
||||
<!-- 场景步骤-->
|
||||
<div v-loading="isReloadData">
|
||||
<div v-loading="loading">
|
||||
<p class="tip">{{$t('api_test.automation.scenario_step')}} </p>
|
||||
<el-row>
|
||||
<el-col :span="21">
|
||||
|
@ -157,13 +157,13 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<!-- 场景步骤内容 -->
|
||||
<div style="margin-top: 10px" v-loading="isReloadData">
|
||||
<div style="margin-top: 10px" v-loading="loading">
|
||||
<el-tree node-key="resourceId" :props="props" :data="scenarioDefinition"
|
||||
:default-expanded-keys="expandedNode"
|
||||
:expand-on-click-node="false"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!isReloadData" draggable>
|
||||
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!loading" draggable>
|
||||
<span class="custom-tree-node father" slot-scope="{ node, data}" style="width: 96%">
|
||||
<template>
|
||||
<!-- 场景 -->
|
||||
|
@ -344,7 +344,7 @@
|
|||
options: API_STATUS,
|
||||
levels: PRIORITY,
|
||||
scenario: {},
|
||||
isReloadData: false,
|
||||
loading: false,
|
||||
apiListVisible: false,
|
||||
customizeVisible: false,
|
||||
scenarioVisible: false,
|
||||
|
@ -565,9 +565,9 @@
|
|||
this.reload();
|
||||
},
|
||||
reload() {
|
||||
this.isReloadData = true
|
||||
this.loading = true
|
||||
this.$nextTick(() => {
|
||||
this.isReloadData = false
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
runDebug() {
|
||||
|
@ -744,7 +744,7 @@
|
|||
},
|
||||
runRefresh() {
|
||||
this.debugVisible = true;
|
||||
this.isReloadData = false;
|
||||
this.loading = false;
|
||||
},
|
||||
showScenarioParameters() {
|
||||
this.$refs.scenarioParameters.open(this.currentScenario.variables);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 29a8fc09602fde5708af06582ac972d98eb69836
|
||||
Subproject commit e1e8b4dffb4f71f1402ddae6bb149dd0be195342
|
Loading…
Reference in New Issue