Kanagaraj M has posted comments on this change.

Change subject: webadmin : Change volume status to yellow when bricks down
......................................................................


Patch Set 13:

(3 comments)

....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeStatusCell.java
Line 52:                     tooltip = constants.up();
Line 53:                 } else {
Line 54:                     statusImage = resources.volumeUpWarning();
Line 55:                     tooltip = constants.allBricksDown();
Line 56:                 }
why there are three cases ?
Line 57:                 break;
Line 58:             default:
Line 59:                 statusImage = resources.downImage();
Line 60:                 tooltip = constants.down();


Line 65:         SafeHtml statusImageHtml =
Line 66:                 
SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML());
Line 67:         SafeHtml alertImageHtml =
Line 68:                 
SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(alertImage).getHTML());
Line 69:         sb.appendHtmlConstant("<div>"); //$NON-NLS-1$
no need to have div, if you are not changing any styles
Line 70: 
Line 71:         if(count == brickCount) {
Line 72:             
sb.append(applicationTemplates.statusWithAlertTemplate(statusImageHtml, 
alertImageHtml, tooltip));
Line 73:         } else {


Line 86:                 upCount++;
Line 87:             }else {
Line 88:                 downCount++;
Line 89:             }
Line 90:             if(upCount > 1 && downCount > 1) {
why not >0 ?

let say a volume has 6 bricks and first 2 are down.
In this scenario, the above loop will executed 4 times but 3 is enough to get 
the expected result
Line 91:                 return downCount;
Line 92:             }
Line 93:         }
Line 94:         return downCount;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iddaf1676bf9bf2c3aa0d4381e5057e21d4c8512e
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: anmolbabu <anb...@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