From abe0cd67b0bbaa9ea171fcc8266f402d3dbb6905 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 27 Oct 2022 11:08:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1018977 --user=刘瑞斌 【性能测试】高级配置-添加监控-执行测试-执行完监控没数据 https://www.tapd.cn/55049933/s/1279549 --- .../backend/src/main/java/io/metersphere/dto/Monitor.java | 2 +- .../java/io/metersphere/service/MetricQueryService.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/performance-test/backend/src/main/java/io/metersphere/dto/Monitor.java b/performance-test/backend/src/main/java/io/metersphere/dto/Monitor.java index b504e300d7..04838ee0e4 100644 --- a/performance-test/backend/src/main/java/io/metersphere/dto/Monitor.java +++ b/performance-test/backend/src/main/java/io/metersphere/dto/Monitor.java @@ -10,7 +10,7 @@ import java.util.List; public class Monitor { private String name; private String ip; - private Integer port; + private String port; private String description; private List monitorConfig; } diff --git a/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java b/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java index 6a5115ff99..5b60658e80 100644 --- a/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java +++ b/performance-test/backend/src/main/java/io/metersphere/service/MetricQueryService.java @@ -165,7 +165,7 @@ public class MetricQueryService { int port = dto.getMonitorPort() == null ? 9100 : dto.getMonitorPort(); Monitor e = new Monitor(); e.setIp(dto.getIp()); - e.setPort(port); + e.setPort(String.valueOf(port)); instances.add(e); } }); @@ -183,7 +183,7 @@ public class MetricQueryService { Monitor monitor = new Monitor(); monitor.setIp((String) m.get("ip")); monitor.setName((String) m.get("name")); - monitor.setPort((int) m.get("port")); + monitor.setPort(String.valueOf(m.get("port"))); monitor.setDescription((String) m.get("description")); // todo monitor.setMonitorConfig((List) m.get("monitorConfig")); @@ -270,7 +270,7 @@ public class MetricQueryService { int port = monitorPort == null ? 9100 : monitorPort; Monitor monitor = new Monitor(); monitor.setIp(dto.getIp()); - monitor.setPort(port); + monitor.setPort(String.valueOf(port)); result.add(monitor); } }); @@ -288,7 +288,7 @@ public class MetricQueryService { Monitor monitor = new Monitor(); monitor.setIp((String) o.get("ip")); monitor.setName((String) o.get("name")); - monitor.setPort((int) o.get("port")); + monitor.setPort(String.valueOf(o.get("port"))); monitor.setDescription((String) o.get("description")); // todo monitor.setMonitorConfig((List) o.get("monitorConfig"));