anmolbabu has uploaded a new change for review.

Change subject: webadmin : Order the Add Block Host List
......................................................................

webadmin : Order the Add Block Host List

Order the Add Block Host List

Change-Id: Idcc47e29a5e54ff2bd76bb71fe8a56ebf4ff28ab
Bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=1044124
Signed-off-by: Anmol Babu <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickListModel.java
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/33767/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickListModel.java
index a16cf4c..6b47b52 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeBrickListModel.java
@@ -1,6 +1,8 @@
 package org.ovirt.engine.ui.uicommonweb.models.gluster;
 
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -16,6 +18,7 @@
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VDSGroup;
 import org.ovirt.engine.core.common.businessentities.VDSStatus;
+import 
org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator;
 import org.ovirt.engine.core.common.businessentities.gluster.BrickDetails;
 import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity;
 import org.ovirt.engine.core.common.businessentities.gluster.GlusterClientInfo;
@@ -368,6 +371,13 @@
                             }
                         }
 
+                        final LexoNumericComparator lexoNumeric = new 
LexoNumericComparator();
+                        Collections.sort(hostList, new Comparator<VDS>() {
+                            @Override
+                            public int compare(VDS host0, VDS host1) {
+                                return 
lexoNumeric.compare(host0.getHostName(), host1.getHostName());
+                            }
+                        });
                         volumeBrickModel.getServers().setItems(hostList);
                     }
                 };


-- 
To view, visit http://gerrit.ovirt.org/33767
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcc47e29a5e54ff2bd76bb71fe8a56ebf4ff28ab
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

Reply via email to