Ravi Nori has uploaded a new change for review. Change subject: webadmin: Dialogue for attaching ISOs is not logically ordered ......................................................................
webadmin: Dialogue for attaching ISOs is not logically ordered In install host dialog the iso's listed are not ordered. Use the new RpmVersionUtils class to order the iso's in decreasing order of version and release. Change-Id: I80cf81769e34bf66e512ada7cb2a60efe88d11ab Bug-Url: https://bugzilla.redhat.com/1060636 Signed-off-by: Ravi Nori <rn...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/19/24019/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java index 32fbd11..787b33b 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.Comparator; import org.ovirt.engine.core.common.VdcActionUtils; import org.ovirt.engine.core.common.action.UpdateVdsActionParameters; @@ -895,7 +896,12 @@ InstallModel model = (InstallModel) target; ArrayList<RpmVersion> isos = (ArrayList<RpmVersion>) returnValue; - Collections.sort(isos, Collections.reverseOrder()); + Collections.sort(isos, new Comparator<RpmVersion>() { + @Override + public int compare(RpmVersion rpmV1, RpmVersion rpmV2) { + return RpmVersionUtils.compareRpmParts(rpmV2.getRpmName(), rpmV1.getRpmName()); + } + }); model.getOVirtISO().setItems(isos); model.getOVirtISO().setSelectedItem(Linq.firstOrDefault(isos)); model.getOVirtISO().setIsAvailable(true); -- To view, visit http://gerrit.ovirt.org/24019 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80cf81769e34bf66e512ada7cb2a60efe88d11ab Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches