配置资源池

This commit is contained in:
Captain.B 2020-03-25 10:51:41 +08:00
parent a04c0fc078
commit 115823f739
3 changed files with 17 additions and 2 deletions

View File

@ -24,6 +24,8 @@ public class TestPlanRequest {
private String schedule; private String schedule;
private String testResourcePoolId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -115,4 +117,11 @@ public class TestPlanRequest {
this.schedule = schedule == null ? null : schedule.trim(); this.schedule = schedule == null ? null : schedule.trim();
} }
public String getTestResourcePoolId() {
return testResourcePoolId;
}
public void setTestResourcePoolId(String testResourcePoolId) {
this.testResourcePoolId = testResourcePoolId;
}
} }

View File

@ -87,6 +87,7 @@ public class LoadTestService {
loadTest.setUpdateTime(System.currentTimeMillis()); loadTest.setUpdateTime(System.currentTimeMillis());
loadTest.setScenarioDefinition("todo"); loadTest.setScenarioDefinition("todo");
loadTest.setDescription("todo"); loadTest.setDescription("todo");
loadTest.setTestResourcePoolId(request.getTestResourcePoolId());
loadTest.setLoadConfiguration(request.getLoadConfiguration()); loadTest.setLoadConfiguration(request.getLoadConfiguration());
loadTest.setAdvancedConfiguration(request.getAdvancedConfiguration()); loadTest.setAdvancedConfiguration(request.getAdvancedConfiguration());
loadTestMapper.insert(loadTest); loadTestMapper.insert(loadTest);
@ -153,6 +154,7 @@ public class LoadTestService {
loadTest.setDescription("todo"); loadTest.setDescription("todo");
loadTest.setLoadConfiguration(request.getLoadConfiguration()); loadTest.setLoadConfiguration(request.getLoadConfiguration());
loadTest.setAdvancedConfiguration(request.getAdvancedConfiguration()); loadTest.setAdvancedConfiguration(request.getAdvancedConfiguration());
loadTest.setTestResourcePoolId(request.getTestResourcePoolId());
loadTestMapper.updateByPrimaryKeySelective(loadTest); loadTestMapper.updateByPrimaryKeySelective(loadTest);
} }

View File

@ -107,9 +107,9 @@
export default { export default {
name: "PerformancePressureConfig", name: "PerformancePressureConfig",
props: ['testPlan'],
data() { data() {
return { return {
testPlan: {},
threadNumber: 10, threadNumber: 10,
duration: 10, duration: 10,
rampUpTime: 10, rampUpTime: 10,
@ -127,7 +127,7 @@
} else { } else {
this.calculateChart(); this.calculateChart();
} }
this.resourcePool = this.testPlan.testResourcePoolId;
this.getResourcePools(); this.getResourcePools();
}, },
watch: { watch: {
@ -141,6 +141,10 @@
} else { } else {
this.calculateChart(); this.calculateChart();
} }
},
testPlan(n) {
this.resourcePool = n.testResourcePoolId;
window.console.log(this.resourcePool);
} }
}, },
methods: { methods: {