Daniel Erez has posted comments on this change.

Change subject: webadmin: Acknowledge labels in Setup Networks dialog
......................................................................


Patch Set 4:

(6 comments)

http://gerrit.ovirt.org/#/c/22971/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java:

Line 543:                     bondToNic.put(bondName, bondedNics);
Line 544:                 }
Line 545:             }
Line 546: 
Line 547:             // bridge name is either <nic>, <nic.vlanid> or 
<bond.vlanid>
dosen't it confilct the change in: 
http://gerrit.ovirt.org/#/c/22970/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
Line 548:             String ifName;
Line 549:             if (dotpos > 0) {
Line 550:                 ifName = nicName.substring(0, dotpos);
Line 551:             } else {


Line 591:                 }
Line 592:             }
Line 593: 
Line 594:             // does this nic have any labels?
Line 595:             Set<String> labels = nic.getLabels();
not sure if related to this patch, but these lines should be refactored 
(extract to methods/etc)
Line 596:             if (labels != null) {
Line 597:                 for (String label : labels) {
Line 598:                     NetworkLabelModel labelModel = 
labelMap.get(label);
Line 599:                     if (labelModel != null) {


http://gerrit.ovirt.org/#/c/22971/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java:

Line 34:             setManagement(true);
Line 35:         }
Line 36:     }
Line 37: 
Line 38:     public void attachViaLabel() {
should be move down along with the setters/getters. btw, shouldn't accept a 
value [i.e. setAttcachViaLabe;(boolean...)]?
Line 39:         attachedViaLabel = true;
Line 40:     }
Line 41: 
Line 42:     /**


http://gerrit.ovirt.org/#/c/22971/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/NetworkInterfaceModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/NetworkInterfaceModel.java:

Line 56:     public List<LogicalNetworkModel> getItems() {
Line 57:         return (List<LogicalNetworkModel>) super.getItems();
Line 58:     }
Line 59: 
Line 60:     public List<NetworkLabelModel> getLabels() {
no need for a setter? (just for the good order..)
Line 61:         return labels;
Line 62:     }
Line 63: 
Line 64:     @Override


http://gerrit.ovirt.org/#/c/22971/4/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkGroup.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkGroup.java:

Line 51:         SortedSet<LogicalNetworkModel> networks = new 
TreeSet<LogicalNetworkModel>(nicModel.getItems());
Line 52:         for (NetworkLabelModel label : labels) {
Line 53:             networks.removeAll(label.getNetworks());
Line 54:         }
Line 55:         int networkSize = labels.size() + networks.size();
maybe worth having some 'total network size' method? (as this calculation is 
being done a couple of times)
Line 56: 
Line 57:         // style
Line 58:         table.setCellSpacing(5);
Line 59:         table.getElement().addClassName(style.groupPanel());


Line 84:         if (networkSize > 0) {
Line 85:             flexCellFormatter.setRowSpan(0, 0, networkSize);
Line 86:             FlexTable networkTable = new FlexTable();
Line 87: 
Line 88:             int i = 0;
* not sure it's more readable than the for loop..
* should be extracted to a method for reusability.
Line 89:             Iterator<NetworkLabelModel> labelIterator = 
labels.iterator();
Line 90:             Iterator<LogicalNetworkModel> networkIterator = 
networks.iterator();
Line 91:             while (labelIterator.hasNext()) {
Line 92:                 networkTable.setWidget(i++, 0, new 
NetworkLabelPanel(labelIterator.next(), style));


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4e7d712fcae59b4e03ff365408161f5472dc235d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Lior Vernia <[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

Reply via email to