fix(性能测试): 修复测试含有监控配置并使用k8s类型资源池时报告中未显示监控Tab
This commit is contained in:
parent
a08fba0f1e
commit
499d062784
|
@ -114,11 +114,6 @@ public class PerformanceReportController {
|
|||
return performanceReportService.getLoadTestReport(reportId);
|
||||
}
|
||||
|
||||
@GetMapping("/pool/type/{reportId}")
|
||||
public String getPoolTypeByReportId(@PathVariable String reportId) {
|
||||
return performanceReportService.getPoolTypeByReportId(reportId);
|
||||
}
|
||||
|
||||
@GetMapping("log/resource/{reportId}")
|
||||
public List<LogDetailDTO> getResourceIds(@PathVariable String reportId) {
|
||||
return performanceReportService.getReportLogResource(reportId);
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<el-tab-pane :label="$t('report.test_log_details')">
|
||||
<ms-report-log-details :report="report"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('report.test_monitor_details')" v-if="poolType === 'NODE'">
|
||||
<el-tab-pane :label="$t('report.test_monitor_details')">
|
||||
<monitor-card :report="report"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -182,7 +182,6 @@ export default {
|
|||
{value: '60', label: '1m'},
|
||||
{value: '300', label: '5m'}
|
||||
],
|
||||
poolType: "",
|
||||
testDeleted: false,
|
||||
};
|
||||
},
|
||||
|
@ -400,21 +399,12 @@ export default {
|
|||
}
|
||||
}
|
||||
localStorage.setItem("reportRefreshTime", this.refreshTime);
|
||||
},
|
||||
getPoolType(reportId) {
|
||||
this.$get("/performance/report/pool/type/" + reportId, result => {
|
||||
let data = result.data;
|
||||
if (data) {
|
||||
this.poolType = data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.isReadOnly = !hasPermission('PROJECT_PERFORMANCE_REPORT:READ+DELETE');
|
||||
this.reportId = this.$route.path.split('/')[4];
|
||||
this.getReport(this.reportId);
|
||||
this.getPoolType(this.reportId);
|
||||
},
|
||||
watch: {
|
||||
'$route'(to) {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<el-tab-pane :label="$t('report.test_log_details')">
|
||||
<ms-report-log-details :report="report"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('report.test_monitor_details')" v-if="poolType === 'NODE'">
|
||||
<el-tab-pane :label="$t('report.test_monitor_details')">
|
||||
<monitor-card :report="report"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -137,7 +137,6 @@ export default {
|
|||
reportExportVisible: false,
|
||||
testPlan: {testResourcePoolId: null},
|
||||
show: true,
|
||||
poolType: "",
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -347,19 +346,10 @@ export default {
|
|||
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() {
|
||||
this.init();
|
||||
this.getPoolType(this.reportId);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue