处理大屏展示资源使用情况问题
parent
052f62aba2
commit
62b373324d
|
@ -105,7 +105,10 @@ public class ResourceScreenServiceImpl implements ResourceScreenService {
|
|||
long cpuTotal = 0L;
|
||||
Long memTotal = 0L;
|
||||
int diskTotal = 0;
|
||||
List<Server> hosts = imsInternalService.listHosts();
|
||||
List<Server> hostAll = imsInternalService.listHosts();
|
||||
List<Server> hosts = hostAll.stream().filter(
|
||||
server -> null != server.getVendorType() && vendors.contains(server.getVendorType()))
|
||||
.collect(Collectors.toList());
|
||||
hosts.removeIf(server -> null == server.getVendorId());
|
||||
Map<Long, List<Server>> hostMap = hosts.stream().filter(server -> null != server.getVendorId())
|
||||
.collect(Collectors.groupingBy(Server::getVendorId));
|
||||
|
|
Loading…
Reference in New Issue