use of models.datatable.BlockConsistencyGroupDataTable in project coprhd-controller by CoprHD.
the class ConsistencyGroups method list.
public static void list() {
BlockConsistencyGroupDataTable dataTable = new BlockConsistencyGroupDataTable();
List<ProjectRestRep> projects = ProjectUtils.getProjects(Models.currentAdminTenant());
Collections.sort(projects, new Comparator<ProjectRestRep>() {
public int compare(ProjectRestRep proj1, ProjectRestRep proj2) {
return proj1.getName().compareTo(proj2.getName());
}
});
String activeProjectId = flash.get(ACTIVE_PROJECT_ID);
if (activeProjectId == null && !projects.isEmpty()) {
activeProjectId = projects.get(0).getId().toString();
}
TenantSelector.addRenderArgs();
render(dataTable, projects, activeProjectId);
}
Aggregations