Lior Vernia has posted comments on this change.

Change subject: webadmin: adding label tag to Host->Interface subtab
......................................................................


Patch Set 3:

(3 comments)

http://gerrit.ovirt.org/#/c/27898/3/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/HostInterfaceForm.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/HostInterfaceForm.java:

Line 123:         grid.setWidget(row, col, widget);
Line 124:         grid.getCellFormatter().setHeight(row, col, "100%"); 
//$NON-NLS-1$
Line 125:     }
Line 126: 
Line 127:     static LabelWithToolTip createInterfaceLabel(VdsNetworkInterface 
iface) {
It might be nicer to create a class extending LabelWithTooltip and put this 
logic in its contructor instead of having this static factory method, don't you 
think?
Line 128:         boolean hasLabels = iface.getLabels() != null
Line 129:                 && !iface.getLabels().isEmpty();
Line 130:         LabelWithToolTip interfaceNameWithLabel =
Line 131:                 new LabelWithToolTip(hasLabels ? 
templates.textImageLabels(iface.getName(), labelImage)


Line 137:     }
Line 138: 
Line 139:     private static SafeHtml createLabelToolTip(Set<String> labels) {
Line 140:         SafeHtmlBuilder tooltip = new SafeHtmlBuilder(); //$NON-NLS-1$
Line 141:         boolean isFirst = true;
Please consider removing the boolean variable, always add the first label and 
then use an iterator to iterate over all other labels starting from the second 
one. It's a matter of style, up to you what you like better.
Line 142: 
Line 143:         if (labels == null) {
Line 144:             return null;
Line 145:         }


http://gerrit.ovirt.org/#/c/27898/3/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfacePanel.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/host/InterfacePanel.java:

Line 51:         row.getColumnFormatter().setWidth(0, "30px"); //$NON-NLS-1$
Line 52:         row.getColumnFormatter().setWidth(1, "210px"); //$NON-NLS-1$
Line 53: 
Line 54:         // Check box and interface status icon
Line 55:         row.setWidget(0, 0, new HorizontalPanel() {
Why was this necessary? The only thing that changed is the addition of the 
label image, does that screw up the layout?
Line 56:             {
Line 57:                 if (isSelectionAvailable) {
Line 58:                     add(getCheckBox());
Line 59:                 }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I997d85d894d79f14402157fcc51a0cdbfe2ff056
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@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

Reply via email to