.addHeader(4, new TableHeader("PID"))
.addHeader(5, new TableHeader("Groups"))
.addHeader(6, new TableHeader("Custom Attributes"));
for (DetailedContainerResource container : containers) {
Map<String, String> copy = new HashMap<String, String>(container.getAttributes());
final TableRow row = table.newRow();
row.addValue(1, copy.remove("id"))
.addValue(2, copy.remove("host"))
.addValue(3, copy.remove("ip"))
.addValue(4, copy.remove("pid"));
String groups = copy.remove("groups");
row.addValue(5, groups == null ? "" : groups);
row.addValue(6, copy.isEmpty() ? "" : copy.toString());
}
return table;
}