Alona Kaplan has uploaded a new change for review.

Change subject: webadmin: The labels should be displayed in lexo numeric order
......................................................................

webadmin: The labels should be displayed in lexo numeric order

The edit interface(nic) label window, and the tool tip on the name of the
nic in the sub tab network interfaces under hosts had to be fixed.

Change-Id: If25a826a3123b43f87e51537a1988209dda31fa6
Bug-Url: https://bugzilla.redhat.com/1091674
Signed-off-by: Alona Kaplan <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfaceLabelWithToolTip.java
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/30217/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java
index a86a314..b0f70ae 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NicLabelModel.java
@@ -9,6 +9,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import 
org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator;
 import 
org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface;
 import org.ovirt.engine.ui.uicommonweb.models.ListModel;
 import org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation;
@@ -46,7 +47,7 @@
             containedIfaces.add(iface.getName());
         }
 
-        Collections.sort(originalLabels);
+        Collections.sort(originalLabels, new LexoNumericComparator());
         LinkedList<ListModel<String>> items = new 
LinkedList<ListModel<String>>();
         for (String label : originalLabels) {
             ListModel<String> labelModel = new ListModel<String>();
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfaceLabelWithToolTip.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfaceLabelWithToolTip.java
index bb361fd..8a8e723 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfaceLabelWithToolTip.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfaceLabelWithToolTip.java
@@ -3,6 +3,7 @@
 import java.util.Arrays;
 import java.util.Set;
 
+import 
org.ovirt.engine.core.common.businessentities.comparators.LexoNumericComparator;
 import 
org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface;
 import org.ovirt.engine.ui.common.widget.label.LabelWithCustomToolTip;
 import org.ovirt.engine.ui.webadmin.ApplicationResources;
@@ -49,7 +50,7 @@
         }
 
         String[] sortedLabels = labels.toArray(new String[] {});
-        Arrays.sort(sortedLabels);
+        Arrays.sort(sortedLabels, new LexoNumericComparator());
 
         for (String label : sortedLabels) {
             if (isFirst) {


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

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

Reply via email to