...
|
...
|
@@ -93,7 +93,16 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
|
|
|
|
|
@Override
|
|
|
public PageResponse<ZkConfig> getZkMonitorTree(ZkTreeReq req) {
|
|
|
|
|
|
return getZkMonitorTreeWithPath(req,"config");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public PageResponse<ZkConfig> getZkMonitorTree4Log4j(ZkTreeReq req) {
|
|
|
return getZkMonitorTreeWithPath(req,"log4j");
|
|
|
}
|
|
|
|
|
|
private PageResponse<ZkConfig> getZkMonitorTreeWithPath(ZkTreeReq req,String equalName) {
|
|
|
|
|
|
String hostIp = getHostIp(req.getIp());
|
|
|
PageResponse<ZkConfig> response = new PageResponse<ZkConfig>();
|
|
|
List<ZkConfig> list = new ArrayList<ZkConfig>();
|
...
|
...
|
@@ -112,18 +121,18 @@ public class ZkMoitorServiceImpl implements IZkMoitorService { |
|
|
zkConfig.setName(chi);
|
|
|
zkConfig.setRoot(rootString);
|
|
|
zkConfig.setIp(req.getIp());
|
|
|
if(chi.equals("config")){
|
|
|
if(chi.equals(equalName)){
|
|
|
list.add(zkConfig);
|
|
|
}
|
|
|
|
|
|
|
|
|
page++;
|
|
|
}
|
|
|
|
|
|
response.setCurrentPage(req.getCurrentPage());
|
|
|
response.setPageSize(req.getPageSize());
|
|
|
response.setTotal(page);
|
|
|
response.setRows(list);
|
|
|
|
|
|
|
|
|
response.setCurrentPage(req.getCurrentPage());
|
|
|
response.setPageSize(req.getPageSize());
|
|
|
response.setTotal(page);
|
|
|
response.setRows(list);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("getZkMonitorTree fail with ip is {}",req.getIp());
|
|
|
e.printStackTrace();
|
...
|
...
|
|