Lior Vernia has posted comments on this change. Change subject: webadmin: update Linq.NetworkComparator ......................................................................
Patch Set 3: (2 comments) http://gerrit.ovirt.org/#/c/37027/3/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java: Line 1312: Line 1313: @Override Line 1314: public int compare(Network net1, Network net2) { Line 1315: // management first Line 1316: if (isManagementNetwork(net1)) { This won't work well if two networks in the DC are management networks (which might happen now). You could fall back to "lexoNumeric" comparison if both are management networks, but I think it's actually more correct to only use this in a cluster context, and in DC context use a name comparison alone. Line 1317: return -1; Line 1318: } else if (isManagementNetwork(net2)) { Line 1319: return 1; Line 1320: } Line 1322: return lexoNumeric.compare(net1.getName(), net2.getName()); Line 1323: } Line 1324: } Line 1325: Line 1326: private static boolean isManagementNetwork(Network network) { Of course this method will be unnecessary if you use the comparator only in cluster context, as you're guaranteed to have a cluster. Line 1327: return network.getCluster() != null && network.getCluster().isManagement(); Line 1328: } Line 1329: Line 1330: public final static class VnicProfileViewComparator implements Comparator<VnicProfileView>, Serializable { -- To view, visit http://gerrit.ovirt.org/37027 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib6d3c01b552c6a8034652e533d2bae7319cbd9fb Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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