fix(性能测试): 修复配置自定义监控不能正常查询的问题

--bug=1018977 --user=刘瑞斌 【性能测试】高级配置-添加监控-执行测试-执行完监控没数据 https://www.tapd.cn/55049933/s/1279549
This commit is contained in:
CaptainB 2022-10-27 11:08:01 +08:00 committed by 刘瑞斌
parent 00e01c8bd7
commit 09bce0f92f
2 changed files with 5 additions and 5 deletions

View File

@ -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<MonitorItem> monitorConfig;
}

View File

@ -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<MonitorItem>) 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<MonitorItem>) o.get("monitorConfig"));