diff --git a/backend/src/main/java/io/metersphere/api/dto/RunRequest.java b/backend/src/main/java/io/metersphere/api/dto/RunRequest.java index dd379f77c2..caaed17c08 100644 --- a/backend/src/main/java/io/metersphere/api/dto/RunRequest.java +++ b/backend/src/main/java/io/metersphere/api/dto/RunRequest.java @@ -11,6 +11,8 @@ import java.util.Map; public class RunRequest { private String testId; private String poolId; + // 开启定时同步 + private boolean enable; // api / case 或有这个属性值 private String reportId; private String url; diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index 8698d4c4fe..7854e7378e 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -192,6 +192,7 @@ public class JMeterService { NodeDTO node = JSON.parseObject(configuration, NodeDTO.class); String nodeIp = node.getIp(); Integer port = node.getPort(); + runRequest.setEnable(node.isEnable()); String uri = String.format(BASE_URL + "/jmeter/api/start", nodeIp, port); ResponseEntity result = restTemplate.postForEntity(uri, runRequest, String.class); if (result == null || !StringUtils.equals("SUCCESS", result.getBody())) { diff --git a/backend/src/main/java/io/metersphere/dto/NodeDTO.java b/backend/src/main/java/io/metersphere/dto/NodeDTO.java index a040c469bd..768f325cd3 100644 --- a/backend/src/main/java/io/metersphere/dto/NodeDTO.java +++ b/backend/src/main/java/io/metersphere/dto/NodeDTO.java @@ -7,6 +7,7 @@ import lombok.Setter; @Setter public class NodeDTO { private String ip; + private boolean enable; private Integer port; private Integer monitorPort; private Integer maxConcurrency; diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index aa6cf7fba4..f12458fe53 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -128,18 +128,23 @@ - + - + + + + + + @@ -201,6 +206,14 @@ :max="1000000000"> + + +