feat(性能测试): 修复报告显示线程组重复的bug

This commit is contained in:
Captain.B 2021-03-05 17:24:12 +08:00
parent d6b73f1305
commit 5595110c1c
1 changed files with 4 additions and 2 deletions

View File

@ -258,13 +258,15 @@ export default {
if (!this.report.testId) { if (!this.report.testId) {
return; return;
} }
let threadGroups = [];
this.result = this.$get('/performance/get-jmx-content/' + this.report.testId, (response) => { this.result = this.$get('/performance/get-jmx-content/' + this.report.testId, (response) => {
response.data.forEach(d => { response.data.forEach(d => {
this.threadGroups = this.threadGroups.concat(findThreadGroup(d.jmx, d.name)); threadGroups = threadGroups.concat(findThreadGroup(d.jmx, d.name));
this.threadGroups.forEach(tg => { threadGroups.forEach(tg => {
tg.options = {}; tg.options = {};
}); });
}); });
this.threadGroups = threadGroups;
this.getLoadConfig(); this.getLoadConfig();
}); });
}, },