From 8c393684e80892c42ad305cbcb72fa49a876dd7d Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 12 Nov 2021 18:26:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/components/LogDetails.vue | 4 +- .../report/components/MonitorCard.vue | 66 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/frontend/src/business/components/performance/report/components/LogDetails.vue b/frontend/src/business/components/performance/report/components/LogDetails.vue index 5e0738d200..6b46f02014 100644 --- a/frontend/src/business/components/performance/report/components/LogDetails.vue +++ b/frontend/src/business/components/performance/report/components/LogDetails.vue @@ -93,11 +93,11 @@ export default { if (this.planReportTemplate) { // this.handleGetLogResourceDetail(this.planReportTemplate.logResourceDetail, resourceId); } else if (this.isShare) { - getSharePerformanceReportLogResourceDetail(this.shareId, this.id, resourceId, this.page[resourceId], data => { + getSharePerformanceReportLogResourceDetail(this.shareId, this.id, resourceId, this.page[resourceId] || 1, data => { this.handleGetLogResourceDetail(data, resourceId); }); } else { - getPerformanceReportLogResourceDetail(this.id, resourceId, this.page[resourceId], data => { + getPerformanceReportLogResourceDetail(this.id, resourceId, this.page[resourceId] || 1, data => { this.handleGetLogResourceDetail(data, resourceId); }); } diff --git a/frontend/src/business/components/performance/report/components/MonitorCard.vue b/frontend/src/business/components/performance/report/components/MonitorCard.vue index c5a3790f59..aa39133a06 100644 --- a/frontend/src/business/components/performance/report/components/MonitorCard.vue +++ b/frontend/src/business/components/performance/report/components/MonitorCard.vue @@ -6,9 +6,9 @@ + v-for="item in instances" + :key="item.ip+item.port" + :value="item.ip+':'+item.port"> {{ item.ip }} {{ item.name }} @@ -36,47 +36,47 @@ + :data="tableData" + stripe + border + style="width: 100%"> + prop="label" + label="Label" + sortable> @@ -226,13 +226,13 @@ export default { }, handleChecked(id) { let curr = this.instances.filter(instance => id === instance.ip + ":" + instance.port)[0]; - if (curr.monitorConfig) { + if (curr && curr.monitorConfig) { this.checkList = []; this.checkOptions = curr.monitorConfig.filter(mc => mc.value && mc.name) - .map(mc => { - this.checkList.push(mc.name); - return {key: mc.name, label: mc.name,}; - }); + .map(mc => { + this.checkList.push(mc.name); + return {key: mc.name, label: mc.name,}; + }); if (this.checkList.length === 0) { this.checkList = checkList; this.checkOptions = checkOptions;