fix(性能测试): 修复测试计划-性能用例-批量执行-并行-查看报告,没有监控tab页

This commit is contained in:
Captain.B 2021-05-25 12:18:09 +08:00 committed by 刘瑞斌
parent f3fe0d7450
commit 13ca43515a
1 changed files with 17 additions and 6 deletions

View File

@ -57,6 +57,9 @@
<el-tab-pane :label="$t('report.test_log_details')"> <el-tab-pane :label="$t('report.test_log_details')">
<ms-report-log-details :report="report"/> <ms-report-log-details :report="report"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('report.test_monitor_details')" v-if="poolType === 'NODE'">
<monitor-card :report="report"/>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -91,11 +94,13 @@ import MsReportTestOverview from "@/business/components/performance/report/compo
import MsContainer from "@/business/components/common/components/MsContainer"; import MsContainer from "@/business/components/common/components/MsContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer"; import MsMainContainer from "@/business/components/common/components/MsMainContainer";
import MsPerformancePressureConfig from "@/business/components/performance/report/components/PerformancePressureConfig"; import MsPerformancePressureConfig from "@/business/components/performance/report/components/PerformancePressureConfig";
import MonitorCard from "@/business/components/performance/report/components/MonitorCard";
export default { export default {
name: "LoadCaseReportView", name: "LoadCaseReportView",
components: { components: {
MonitorCard,
MsPerformanceReportExport, MsPerformanceReportExport,
MsReportErrorLog, MsReportErrorLog,
MsReportLogDetails, MsReportLogDetails,
@ -125,7 +130,8 @@ export default {
dialogFormVisible: false, dialogFormVisible: false,
reportExportVisible: false, reportExportVisible: false,
testPlan: {testResourcePoolId: null}, testPlan: {testResourcePoolId: null},
show: true show: true,
poolType: "",
} }
}, },
props: { props: {
@ -316,10 +322,6 @@ export default {
}); });
}, },
init() { init() {
this.isReadOnly = false;
if (!checkoutTestManagerOrTestUser()) {
this.isReadOnly = true;
}
this.clearData(); this.clearData();
this.result = this.$get("/performance/report/" + this.reportId, res => { this.result = this.$get("/performance/report/" + this.reportId, res => {
let data = res.data; let data = res.data;
@ -336,13 +338,22 @@ export default {
this.initBreadcrumb(); this.initBreadcrumb();
this.initWebSocket(); this.initWebSocket();
} else { } else {
this.$error(this.$t('report.not_exist')) this.$error(this.$t('report.not_exist'));
}
});
},
getPoolType(reportId) {
this.$get("/performance/report/pool/type/" + reportId, result => {
let data = result.data;
if (data) {
this.poolType = data;
} }
}); });
} }
}, },
created() { created() {
this.init(); this.init();
this.getPoolType(this.reportId);
} }
} }
</script> </script>