public void fillModel()

in server/src/jetbrains/buildServer/agentsDiff/BuildAgentsDiffTab.java [43:63]


  public void fillModel(@NotNull Map<String, Object> model, @NotNull HttpServletRequest request) {
    super.fillModel(model, request);
    List<BuildAgentEx> authorized = myBuildAgentManager.getAllAgents(false);
    model.put("allAgents", authorized);

    final Set<Integer> authorizedIds = authorized.stream().map(BuildAgent::getId).collect(Collectors.toSet());
    Collection<BuildAgentEx> unauthorized = myBuildAgentManager.getAllAgents(true)
            .stream()
            .filter(agent -> !authorizedIds.contains(agent.getId()))
            .collect(Collectors.toList());
    model.put("unauthorizedAgents", unauthorized);

    List<AgentType> types = myAgentTypeStorage.getAgentTypeIds()
            .stream()
            .map(myAgentTypeStorage::findAgentTypeById)
            .filter(Objects::nonNull)
            .filter(data -> data instanceof SAgentType && ((SAgentType) data).getRealAgent() == null)
            .collect(Collectors.toList());

    model.put("cloudAgentTypes", types);
  }