Lior Vernia has posted comments on this change.
Change subject: webadmin: sort vnic profiles tabs
......................................................................
Patch Set 7: Code-Review+1
(3 comments)
Please see several 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;
Null last? Usually you'd want null first in list box widgets, which are some of
the uses for this comparator.
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/networks/NetworkProfileListModel.java
Line 199: updateActionAvailability();
Line 200: }
Line 201:
Line 202: @Override
Line 203: public void setItems(Iterable value) {
As I said in an earlier patch, I think this would belong better in the
constructor in setComparator().
Line 204: if (value != null) {
Line 205: Collections.sort((List<VnicProfileView>) value, new
Linq.VnicProfileViewComparator());
Line 206: }
Line 207: super.setItems(value);
....................................................
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) {
Do we usually sort the items in main tabs? I thought we usually leave the
sorting to the database in those.
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 <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches