From bb47c26701995c3ec6d4e7ab33e31619d46c614a Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 28 Dec 2021 17:58:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=AF=E5=90=A6=E5=BC=80=E5=90=AF=E5=AE=9A?= =?UTF-8?q?=E6=97=B6=E5=90=8C=E6=AD=A5jar=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/dto/RunRequest.java | 2 ++ .../metersphere/api/jmeter/JMeterService.java | 1 + .../main/java/io/metersphere/dto/NodeDTO.java | 1 + .../settings/system/TestResourcePool.vue | 17 +++++++++++++++-- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 7 files changed, 22 insertions(+), 2 deletions(-) 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"> + + +