// does this change if we have 50 node, 100node, 500 node clusters?
final Map<String,RoleInstance> containerInstances = getContainerInstances(slider.getAppState().cloneActiveContainerList());
for (Entry<String,RoleStatus> entry : slider.getRoleStatusByName().entrySet()) {
final String name = entry.getKey();
final RoleStatus roleStatus = entry.getValue();
DIV<Hamlet> div = html.div("role-info ui-widget-content ui-corner-all");
List<ClusterNode> nodesInRole;
try {
nodesInRole = clusterOps.listClusterNodesInRole(name);
} catch (Exception e) {
log.error("Could not fetch containers for role: " + name, e);
nodesInRole = Collections.emptyList();
}
div.h2(BOLD, StringUtils.capitalize(name));
// Generate the details on this role
Iterable<Entry<String,Integer>> stats = roleStatus.buildStatistics().entrySet();
generateRoleDetails(div,"role-stats-wrap", "Specifications", Iterables.transform(stats, stringIntPairFunc));
// Sort the ClusterNodes by their name (containerid)
Collections.sort(nodesInRole, new ClusterNodeNameComparator());