Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Fixed sorting of bonds in create bond popup
......................................................................

webadmin: Fixed sorting of bonds in create bond popup

Added sorting using LexoNumericComparator.

Change-Id: Ief91fe080d1642d25eca43be9506250892ce746b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=891061
Signed-off-by: Lior Vernia <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/54/12154/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
index 1a2be25..556bf29 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
@@ -444,6 +444,18 @@
                 return;
             }
             bondPopup.getBond().setItems(freeBonds);
+
+            Collections.sort(freeBonds, new Comparator<VdsNetworkInterface>() {
+
+                LexoNumericComparator lexoNumeric = new 
LexoNumericComparator();
+
+                @Override
+                public int compare(VdsNetworkInterface bond1, 
VdsNetworkInterface bond2) {
+                    return lexoNumeric.compare(bond1.getName(), 
bond2.getName());
+                }
+
+            });
+
             bondPopup.getCommands().add(new UICommand("OK", new 
BaseCommandTarget() { //$NON-NLS-1$
 
                         @Override


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief91fe080d1642d25eca43be9506250892ce746b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to