use of models.datatable.NodesDataTable in project coprhd-controller by CoprHD.
the class SystemHealth method systemHealth.
public static void systemHealth() {
final ViPRSystemClient client = BourneUtil.getSysClient();
List<NodeHealth> nodeHealthList = MonitorUtils.getNodeHealth(client);
Map<String, Integer> statusCount = Maps.newHashMap();
// Initialize Map so with a "Good" status to have 0 services so when we display, if no other service is "Good" it will still display
// that in UI.
statusCount.put(Status.GOOD.toString(), 0);
for (NodeHealth nodeHealth : nodeHealthList) {
Integer count = statusCount.get(nodeHealth.getStatus());
statusCount.put(nodeHealth.getStatus(), (count == null) ? 1 : ++count);
}
renderArgs.put("allServices", getAllServiceNames(nodeHealthList));
angularRenderArgs().put("clusterInfo", AdminDashboardUtils.getClusterInfo());
renderArgs.put("dataTable", new NodesDataTable());
angularRenderArgs().put("nodeCount", nodeHealthList.size());
angularRenderArgs().put("statusCount", statusCount);
render();
}
Aggregations