diff --git a/frontend/src/business/components/api/report/ApiReportView.vue b/frontend/src/business/components/api/report/ApiReportView.vue
index d2f8361e5e..2ef10831d0 100644
--- a/frontend/src/business/components/api/report/ApiReportView.vue
+++ b/frontend/src/business/components/api/report/ApiReportView.vue
@@ -5,34 +5,22 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{$t('api_report.fail')}}
+
+
+
+
@@ -45,23 +33,30 @@
import MsRequestResult from "./components/RequestResult";
import MsScenarioResult from "./components/ScenarioResult";
import MsMetricChart from "./components/MetricChart";
+ import MsScenarioResults from "./components/ScenarioResults";
export default {
name: "MsApiReportView",
- components: {MsMetricChart, MsScenarioResult, MsRequestResult},
+ components: {MsScenarioResults, MsMetricChart, MsScenarioResult, MsRequestResult},
data() {
return {
+ activeName: "total",
content: {},
report: {},
- loading: true
+ loading: true,
+ fails: []
}
},
methods: {
- getReport() {
+ init() {
this.loading = true;
this.report = {};
this.content = {};
+ this.fails = [];
+ },
+ getReport() {
+ this.init();
if (this.reportId) {
let url = "/api/report/get/" + this.reportId;
@@ -69,12 +64,32 @@
this.report = response.data || {};
if (this.isCompleted) {
this.content = JSON.parse(this.report.content);
+ this.getFails();
this.loading = false;
} else {
setTimeout(this.getReport, 2000)
}
});
}
+ },
+ getFails() {
+ if (this.isCompleted) {
+ this.fails = [];
+ this.content.scenarios.forEach((scenario) => {
+ let failScenario = Object.assign({}, scenario);
+ if (scenario.error > 0) {
+ this.fails.push(failScenario);
+ failScenario.requestResults = [];
+ scenario.requestResults.forEach((request) => {
+ if (!request.success) {
+ let failRequest = Object.assign({}, request);
+ failScenario.requestResults.push(failRequest);
+ }
+ })
+
+ }
+ })
+ }
}
},
@@ -99,6 +114,11 @@
}
}
+
diff --git a/frontend/src/business/components/api/report/components/AssertionResults.vue b/frontend/src/business/components/api/report/components/AssertionResults.vue
index c00bcf6457..f33a998781 100644
--- a/frontend/src/business/components/api/report/components/AssertionResults.vue
+++ b/frontend/src/business/components/api/report/components/AssertionResults.vue
@@ -1,9 +1,7 @@
-
-
-
-
+
+
diff --git a/frontend/src/business/components/api/report/components/LogDetails.vue b/frontend/src/business/components/api/report/components/LogDetails.vue
deleted file mode 100644
index 217d82ceb4..0000000000
--- a/frontend/src/business/components/api/report/components/LogDetails.vue
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
diff --git a/frontend/src/business/components/api/report/components/ResultDetails.vue b/frontend/src/business/components/api/report/components/ResultDetails.vue
deleted file mode 100644
index 0d05357c85..0000000000
--- a/frontend/src/business/components/api/report/components/ResultDetails.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
- ResultDetails
-
-
-
-
-
-
diff --git a/frontend/src/business/components/api/report/components/ScenarioResults.vue b/frontend/src/business/components/api/report/components/ScenarioResults.vue
new file mode 100644
index 0000000000..6d311f7c70
--- /dev/null
+++ b/frontend/src/business/components/api/report/components/ScenarioResults.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 868dbf50a1..5843bdcb93 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -332,6 +332,7 @@ export default {
result: "Result",
success: "Success",
fail: "Fail",
+ total: "Total",
test_name: "Test"
},
test_track: {
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index 04c153b838..4c8f6b1d50 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -329,6 +329,7 @@ export default {
result: "结果",
success: "成功",
fail: "失败",
+ total: "全部",
test_name: "所属测试"
},
test_track: {
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 07ce2c373a..534a571195 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -323,6 +323,7 @@ export default {
result: "結果",
success: "成功",
fail: "失敗",
+ total: "全部",
test_name: "所屬測試"
},
test_track: {