From 9cce9f93fc2570e470dfcb49e4420c21e0d5372f Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 20 Oct 2023 16:45:49 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=86=85=E5=AE=B9=E5=AD=97=E6=AE=B5=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=98=E5=82=A8=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1032243 --user=宋天阳 【性能测试】报告-错误记录-所有请求-正确请求-点击查看详情没反应-前端报错 https://www.tapd.cn/55049933/s/1429143 --- .../db/migration/2.10.8.ddl/V4__2.10.8_release.sql | 7 +++++++ .../report/components/samples/ErrorSamplesTable.vue | 5 ++++- .../report/components/samples/SamplesDrawer.vue | 10 +++++++--- .../business/report/components/samples/SamplesTabs.vue | 4 +++- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 performance-test/backend/src/main/resources/db/migration/2.10.8.ddl/V4__2.10.8_release.sql diff --git a/performance-test/backend/src/main/resources/db/migration/2.10.8.ddl/V4__2.10.8_release.sql b/performance-test/backend/src/main/resources/db/migration/2.10.8.ddl/V4__2.10.8_release.sql new file mode 100644 index 0000000000..8f85a7ce10 --- /dev/null +++ b/performance-test/backend/src/main/resources/db/migration/2.10.8.ddl/V4__2.10.8_release.sql @@ -0,0 +1,7 @@ +SET SESSION innodb_lock_wait_timeout = 7200; +-- +-- 增加一个索引 +ALTER TABLE load_test_report_result_realtime + MODIFY COLUMN `report_value` longtext NULL; + +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue b/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue index 2d5a7abd30..9dc614f3b2 100644 --- a/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue +++ b/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue @@ -136,7 +136,10 @@ export default { done(); }, openRecord(row) { - let drawerSamples = this.errorSamples.samples[row.name][row.code]; + let drawerSamples = []; + if (this.errorSamples.samples[row.name]) { + drawerSamples = this.errorSamples.samples[row.name][row.code]; + } this.$refs.sampleDrawer.openRecord(drawerSamples); }, }, diff --git a/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue b/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue index dd5491b0e8..28e3d5ca49 100644 --- a/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue +++ b/performance-test/frontend/src/business/report/components/samples/SamplesDrawer.vue @@ -56,12 +56,16 @@ export default { }, openRecord(samples) { this.sampleRecord = []; + this.$nextTick(() => { - samples.forEach(sample => { - this.sampleRecord.push(sample); - }); + if (samples) { + samples.forEach(sample => { + this.sampleRecord.push(sample); + }); + } this.drawer = true; }) + }, }, } diff --git a/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue b/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue index 38df0bea0f..b804d9dfa0 100644 --- a/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue +++ b/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue @@ -52,7 +52,9 @@ export default { this.errorSamples.samples[sampleName] = {}; } this.errorSamples.sampleCount[sampleName][code] = this.samples.sampleCount[sampleName][code] || {}; - this.errorSamples.samples[sampleName][code] = this.samples.samples[sampleName][code] || []; + if (this.samples.samples[sampleName]) { + this.errorSamples.samples[sampleName][code] = this.samples.samples[sampleName][code] || []; + } } } }