refactor(性能测试): 修改测试报告展示压力配置的逻辑
This commit is contained in:
parent
88a9807dfb
commit
92667da369
|
@ -151,20 +151,27 @@ export default {
|
|||
this.calculateChart();
|
||||
},
|
||||
getLoadConfig() {
|
||||
if (!this.report.loadConfiguration) {
|
||||
if (!this.report.testId) {
|
||||
if (!this.report.id) {
|
||||
return;
|
||||
}
|
||||
this.$get("/performance/report/" + this.report.id, res => {
|
||||
let data = res.data;
|
||||
if (data) {
|
||||
if (data.loadConfiguration) {
|
||||
let d = JSON.parse(data.loadConfiguration);
|
||||
this.calculateLoadConfiguration(d);
|
||||
} else {
|
||||
this.$get('/performance/get-load-config/' + this.report.testId, (response) => {
|
||||
if (response.data) {
|
||||
let data = JSON.parse(response.data);
|
||||
this.calculateLoadConfiguration(data);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
let data = JSON.parse(this.report.loadConfiguration);
|
||||
this.calculateLoadConfiguration(data);
|
||||
}
|
||||
} else {
|
||||
this.$error(this.$t('report.not_exist'))
|
||||
}
|
||||
});
|
||||
},
|
||||
calculateChart() {
|
||||
if (this.duration < this.rampUpTime) {
|
||||
|
|
Loading…
Reference in New Issue