fix(性能测试): 修复增加了自定义监控时不能正常显示监控的问题
This commit is contained in:
parent
6eea8535a6
commit
fb2ed3dd1a
|
@ -185,8 +185,9 @@ public class MetricQueryService {
|
||||||
monitor.setName((String) m.get("name"));
|
monitor.setName((String) m.get("name"));
|
||||||
monitor.setPort(String.valueOf(m.get("port")));
|
monitor.setPort(String.valueOf(m.get("port")));
|
||||||
monitor.setDescription((String) m.get("description"));
|
monitor.setDescription((String) m.get("description"));
|
||||||
// todo
|
if (m.get("monitorConfig") instanceof String && StringUtils.isNotBlank((String) m.get("monitorConfig"))) {
|
||||||
monitor.setMonitorConfig((List<MonitorItem>) m.get("monitorConfig"));
|
monitor.setMonitorConfig(JSON.parseArray((String) m.get("monitorConfig"), MonitorItem.class));
|
||||||
|
}
|
||||||
instances.add(monitor);
|
instances.add(monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,8 +291,9 @@ public class MetricQueryService {
|
||||||
monitor.setName((String) o.get("name"));
|
monitor.setName((String) o.get("name"));
|
||||||
monitor.setPort(String.valueOf(o.get("port")));
|
monitor.setPort(String.valueOf(o.get("port")));
|
||||||
monitor.setDescription((String) o.get("description"));
|
monitor.setDescription((String) o.get("description"));
|
||||||
// todo
|
if (o.get("monitorConfig") instanceof String && StringUtils.isNotBlank((String) o.get("monitorConfig"))) {
|
||||||
monitor.setMonitorConfig((List<MonitorItem>) o.get("monitorConfig"));
|
monitor.setMonitorConfig(JSON.parseArray((String) o.get("monitorConfig"), MonitorItem.class));
|
||||||
|
}
|
||||||
result.add(monitor);
|
result.add(monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue