Kanagaraj M has posted comments on this change.
Change subject: webadmin : Change volume status to yellow when bricks down
......................................................................
Patch Set 14:
(3 comments)
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeStatusCell.java
Line 25:
Line 26: @Override
Line 27: public void render(Context context, GlusterVolumeEntity volume,
SafeHtmlBuilder sb) {
Line 28: // Nothing to render if no volume is provided:
Line 29: int brickCount = volume.getBricks().size();
this should come after the volume==null check
Line 30: if (volume == null) {
Line 31: return;
Line 32: }
Line 33: int count = 0;
Line 51: statusImage = resources.volumeUpWarning();
Line 52: if(count < brickCount) {
Line 53: tooltip = constants.volumeBricksDown();
Line 54: } else {
Line 55: tooltip = constants.allBricksDown();
keep the method names in-sync
volumeSomeBricksDown()
volumeAllBricksDown()
Line 56: }
Line 57: }
Line 58: break;
Line 59: default:
Line 77:
Line 78: public int countDownBricks(GlusterVolumeEntity volume) {
Line 79: int downCount = 0;
Line 80: int upCount = 0;
Line 81: for (int i = 0 ; i < volume.getBricks().size(); i++) {
use foreach style loop
Line 82: GlusterBrickEntity brick = volume.getBricks().get(i);
Line 83: if(brick.getStatus() == GlusterStatus.UP) {
Line 84: upCount++;
Line 85: }else {
--
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: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: anmolbabu <[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