Kanagaraj M has posted comments on this change. Change subject: webadmin : Change volume status to yellow when bricks down ......................................................................
Patch Set 8: (2 comments) .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeStatusCell.java Line 58: // Generate the HTML for the image: Line 59: SafeHtml statusImageHtml = Line 60: SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); Line 61: sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); Line 62: if(countBrickDown(volume) == brickCount) { repeated call to countBrickDown. This can be avoided by storing the result of the above call to the same method Line 63: ImageResource alertImage = resources.alertImage(); Line 64: SafeHtml alertImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(alertImage).getHTML()); Line 65: sb.append(alertImageHtml); Line 66: } Line 65: sb.append(alertImageHtml); Line 66: } Line 67: } Line 68: Line 69: public int countBrickDown(GlusterVolumeEntity volume) { better name would be "countDownBricks" Line 70: int count = 0; Line 71: for (int i = 0 ; i < volume.getBricks().size(); i++) { Line 72: if (volume.getBricks().get(i).getStatus() == GlusterStatus.DOWN) { Line 73: count++; -- 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: 8 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