.th(".node", "Node").th(".exitstatus", "Container Exit Status")
.th(".logs", "Logs")._()._().tbody();
StringBuilder containersTableData = new StringBuilder("[\n");
for (ContainerReport containerReport : containers) {
ContainerInfo container = new ContainerInfo(containerReport);
// ConatinerID numerical value parsed by parseHadoopID in
// yarn.dt.plugins.js
containersTableData
.append("[\"<a href='")
.append(url("container", container.getContainerId()))
.append("'>")
.append(container.getContainerId())
.append("</a>\",\"<a href='")
.append(container.getAssignedNodeId())
.append("'>")
.append(
StringEscapeUtils.escapeJavaScript(StringEscapeUtils
.escapeHtml(container.getAssignedNodeId()))).append("</a>\",\"")
.append(container.getContainerExitStatus()).append("\",\"<a href='")
.append(container.getLogUrl() == null ?
"#" : container.getLogUrl()).append("'>")
.append(container.getLogUrl() == null ?
"N/A" : "Logs").append("</a>\"],\n");
}
if (containersTableData.charAt(containersTableData.length() - 2) == ',') {
containersTableData.delete(containersTableData.length() - 2,
containersTableData.length() - 1);