Alona Kaplan has posted comments on this change. Change subject: webadmin: sort vnic profiles tabs ......................................................................
Patch Set 7: (2 comments) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java Line 1113: public int compare(VnicProfileView vnicProfile1, VnicProfileView vnicProfile2) { Line 1114: if (vnicProfile1 == null) { Line 1115: return vnicProfile2 == null ? 0 : 1; Line 1116: } else if (vnicProfile2 == null) { Line 1117: return -1; I this case we don't want the null to be the default value. That is the reason I put it last and not first. Line 1118: } Line 1119: Line 1120: int retVal = lexoNumeric.compare(vnicProfile1.getNetworkName(), vnicProfile2.getNetworkName()); Line 1121: .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/profiles/VnicProfileListModel.java Line 305: return (VnicProfileView) super.getEntity(); Line 306: } Line 307: Line 308: @Override Line 309: public void setItems(Iterable value) { Usually we leave it as is, cause the search can sort them. In this case we don;t have search. In the next phase when we will have search query for the vnic profile this sort should be removed... Line 310: if (value != null) { Line 311: Collections.sort((List<VnicProfileView>) value, new Linq.VnicProfileViewComparator()); Line 312: } Line 313: super.setItems(value); -- To view, visit http://gerrit.ovirt.org/17574 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13a13c881bca54daeca97f7bd5bae74e5b37bb90 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches