Lior Vernia has posted comments on this change.

Change subject: webadmin: Manage network dialog- replace VM network checkbox 
with icon
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/24830/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterManageNetworkPopupView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterManageNetworkPopupView.java:

Line 209:                 
sb.append(templates.textForCheckBox(constants.required()));
Line 210:             }
Line 211:         }, requiredAllHeader, "110px"); //$NON-NLS-1$
Line 212: 
Line 213:         SafeHtmlWithSafeHtmlTooltipColumn<EntityModel> vmColumn =
Any reason not to make this <ClusterNetworkModel> and not have to cast later?
Line 214:                 new SafeHtmlWithSafeHtmlTooltipColumn<EntityModel>() {
Line 215:                     @Override
Line 216:                     public SafeHtml getValue(EntityModel model) {
Line 217:                         List<SafeHtml> images = new 
LinkedList<SafeHtml>();


Line 213:         SafeHtmlWithSafeHtmlTooltipColumn<EntityModel> vmColumn =
Line 214:                 new SafeHtmlWithSafeHtmlTooltipColumn<EntityModel>() {
Line 215:                     @Override
Line 216:                     public SafeHtml getValue(EntityModel model) {
Line 217:                         List<SafeHtml> images = new 
LinkedList<SafeHtml>();
You could immediately instantiate a single-member list with 
Collections.singletonList(), and use the ?: operator to just inline the 
condition when instantiating.
Line 218:                         if (((ClusterNetworkModel) 
model).isVmNetwork()) {
Line 219:                             images.add(vmImage);
Line 220:                         } else {
Line 221:                             images.add(emptyImage);


Line 224:                     }
Line 225: 
Line 226:                     @Override
Line 227:                     public SafeHtml getTooltip(EntityModel model) {
Line 228:                         Map<SafeHtml, String> imagesToText = new 
LinkedHashMap<SafeHtml, String>();
You could inline this as part of the return statement by using 
Collections.singletonMap().
Line 229:                         if (((ClusterNetworkModel) 
model).isVmNetwork()) {
Line 230:                             imagesToText.put(vmImage, 
constants.vmItemInfo());
Line 231:                         }
Line 232: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie96e3f173b0b510f1b8f20c9e9649eb937054d1a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@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

Reply via email to