From f82e147c7def54b1eac89357541f53c0c2379049 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 24 Oct 2022 16:10:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=89=93=E5=BC=80=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E6=8A=A5=E5=91=8A=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018686 --user=李玉号 【测试跟踪】测试计划-查看报告-打开性能报告-Console报错 https://www.tapd.cn/55049933/s/1274477 --- .../frontend/src/business/report/components/MonitorCard.vue | 4 ++-- .../plan/view/comonents/report/detail/load/MonitorCard.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/performance-test/frontend/src/business/report/components/MonitorCard.vue b/performance-test/frontend/src/business/report/components/MonitorCard.vue index 28f39ee561..cf3f254ae8 100644 --- a/performance-test/frontend/src/business/report/components/MonitorCard.vue +++ b/performance-test/frontend/src/business/report/components/MonitorCard.vue @@ -187,7 +187,7 @@ export default { if (currentInstance) { this.currentInstance = currentInstance; } else { - this.currentInstance = this.currentInstance || this.instances[0].ip + ":" + this.instances[0].port; + this.currentInstance = this.currentInstance || this.instances[0]?.ip + ":" + this.instances[0]?.port; } this.handleChecked(this.currentInstance); getSharePerformanceMetricQuery(this.shareId, this.id) @@ -210,7 +210,7 @@ export default { this.showChart = true; }); } else { - this.currentInstance = this.currentInstance || this.instances[0].ip + ":" + this.instances[0].port; + this.currentInstance = this.currentInstance || this.instances[0]?.ip + ":" + this.instances[0]?.port; } this.handleChecked(this.currentInstance); getPerformanceMetricQuery(this.id).then(result => { diff --git a/test-track/frontend/src/business/plan/view/comonents/report/detail/load/MonitorCard.vue b/test-track/frontend/src/business/plan/view/comonents/report/detail/load/MonitorCard.vue index 6466cf2cd6..be6d2db55c 100644 --- a/test-track/frontend/src/business/plan/view/comonents/report/detail/load/MonitorCard.vue +++ b/test-track/frontend/src/business/plan/view/comonents/report/detail/load/MonitorCard.vue @@ -171,7 +171,7 @@ export default { // this.init = true; if (this.planReportTemplate) { this.instances = this.planReportTemplate.reportResource; - this.currentInstance = currentInstance || this.instances[0].ip + ":" + this.instances[0].port; + this.currentInstance = currentInstance || this.instances[0]?.ip + ":" + this.instances[0]?.port; this.data = this.planReportTemplate.metricData; this.totalOption = this.getOption(this.currentInstance); }