fix(性能测试): 修复测试含有监控配置并使用k8s类型资源池时报告中未显示监控Tab
This commit is contained in:
parent
a981cc1a81
commit
d33f6eccea
|
@ -119,11 +119,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);
|
||||
|
|
|
@ -97,7 +97,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>
|
||||
|
@ -188,7 +188,6 @@ export default {
|
|||
{value: '60', label: '1m'},
|
||||
{value: '300', label: '5m'}
|
||||
],
|
||||
poolType: "",
|
||||
testDeleted: false,
|
||||
};
|
||||
},
|
||||
|
@ -410,21 +409,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) {
|
||||
|
|
|
@ -66,7 +66,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>
|
||||
|
@ -142,7 +142,6 @@ export default {
|
|||
reportExportVisible: false,
|
||||
testPlan: {testResourcePoolId: null},
|
||||
show: true,
|
||||
poolType: "",
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -356,19 +355,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