性能测试首页定时任务列表

This commit is contained in:
chenjianxing 2020-08-04 17:35:09 +08:00
parent 79c3e771c4
commit 998750d77f
5 changed files with 15 additions and 8 deletions

View File

@ -424,11 +424,13 @@ public class PerformanceTestService {
List<String> resourceIds = schedules.stream()
.map(Schedule::getResourceId)
.collect(Collectors.toList());
LoadTestExample example = new LoadTestExample();
example.createCriteria().andIdIn(resourceIds);
List<LoadTest> loadTests = loadTestMapper.selectByExample(example);
Map<String, String> loadTestMap = loadTests.stream().collect(Collectors.toMap(LoadTest::getId, LoadTest::getName));
scheduleService.build(loadTestMap, schedules);
if (!resourceIds.isEmpty()) {
LoadTestExample example = new LoadTestExample();
example.createCriteria().andIdIn(resourceIds);
List<LoadTest> loadTests = loadTestMapper.selectByExample(example);
Map<String, String> loadTestMap = loadTests.stream().collect(Collectors.toMap(LoadTest::getId, LoadTest::getName));
scheduleService.build(loadTestMap, schedules);
}
return schedules;
}
}

View File

@ -63,7 +63,7 @@
},
link(row) {
this.$router.push({
path: this.operators.linkUrl + '?id=' + row.resourceId,
path: this.operators.linkUrl + row.resourceId,
})
},
update(schedule) {
@ -76,12 +76,12 @@
case SCHEDULE_TYPE.API_TEST:
this.operators.listUrl = '/api/list/schedule';
this.operators.updateUrl = '/api/schedule/update';
this.operators.linkUrl = '/api/test/edit';
this.operators.linkUrl = '/api/test/edit?id=';
break;
case SCHEDULE_TYPE.PERFORMANCE_TEST:
this.operators.listUrl = '/performance/list/schedule';
this.operators.updateUrl = '/performance/schedule/update';
this.operators.linkUrl = '/performance//test/edit';
this.operators.linkUrl = '/performance/test/edit/';
break;
default:
break;

View File

@ -13,6 +13,9 @@
<el-col :span="12">
<ms-test-heatmap :values="values"/>
</el-col>
<el-col :span="12">
<ms-api-test-schedule-list :group="'PERFORMANCE_TEST'"/>
</el-col>
</el-row>
</ms-main-container>
</ms-container>
@ -25,10 +28,12 @@
import MsPerformanceTestRecentList from "./PerformanceTestRecentList"
import MsPerformanceReportRecentList from "./PerformanceReportRecentList"
import MsTestHeatmap from "../../common/components/MsTestHeatmap";
import MsApiTestScheduleList from "../../api/home/ApiTestScheduleList";
export default {
name: "PerformanceTestHome",
components: {
MsApiTestScheduleList,
MsTestHeatmap,
MsMainContainer,
MsContainer,