|
|
package com.monitor.cmdb.ctrl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.model.HostInfo;
|
|
|
import com.monitor.cmdb.service.IHostInfoService;
|
|
|
import com.monitor.compare.model.HostIpsRequest;
|
|
|
import com.monitor.model.request.HostInfoReq;
|
|
|
import com.monitor.model.response.PageResponse;
|
|
|
import com.monitor.model.response.BaseResponse;
|
...
|
...
|
@@ -15,6 +17,9 @@ import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* Created by yoho on 2016/6/14.
|
...
|
...
|
@@ -82,5 +87,16 @@ public class HostInfoCtrl { |
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping("/getHostInfoByIps")
|
|
|
@ResponseBody
|
|
|
public BaseResponse<List<HostInfo>> getHostInfoByIps(String ips) throws Exception {
|
|
|
List<String> hostIps = JSON.parseArray(ips,String.class);
|
|
|
log.info("getHostInfoByIps with param is {}", ips);
|
|
|
List<HostInfo> hostInfos = hostInfoService.getHostInfoByIps(hostIps);
|
|
|
BaseResponse<List<HostInfo>> response = new BaseResponse<List<HostInfo>>(hostInfos);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
|