anmolbabu has uploaded a new change for review. Change subject: webadmin : Sort the host column in the Clusters Services tab ......................................................................
webadmin : Sort the host column in the Clusters Services tab Sort the host column in the Clusters Services tab, when 'Show All' is used Change-Id: I32e6dfdd922d9e6939b6c69fc1119f737ae69886 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1044847 Signed-off-by: Anmol Babu <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterServiceModel.java 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/26315/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterServiceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterServiceModel.java index 4447a6e..94d1416 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterServiceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterServiceModel.java @@ -1,6 +1,8 @@ package org.ovirt.engine.ui.uicommonweb.models.clusters; import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; import java.util.List; import org.ovirt.engine.core.common.businessentities.VDS; @@ -174,7 +176,14 @@ VDS selectedVds = (VDS) hostList.getSelectedItem(); ServiceType serviceType = (ServiceType) serviceTypeList.getSelectedItem(); ArrayList<EntityModel> list = new ArrayList<EntityModel>(); - for (GlusterServerService service : getActualServiceList()) { + List<GlusterServerService> serviceList = new ArrayList<GlusterServerService>(getActualServiceList()); + Collections.sort(serviceList, new Comparator<GlusterServerService>() { + @Override + public int compare(GlusterServerService o1, GlusterServerService o2) { + return o1.getHostName().compareTo(o2.getHostName()); + } + }); + for (GlusterServerService service : serviceList) { if ((selectedVds == null || service.getHostName().equals(selectedVds.getHostName())) && (serviceType == null || service.getServiceType() == serviceType)) { list.add(new EntityModel(service)); -- To view, visit http://gerrit.ovirt.org/26315 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32e6dfdd922d9e6939b6c69fc1119f737ae69886 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
