Kanagaraj M has posted comments on this change. Change subject: webadmin : Volume and Brick Capacity UI ......................................................................
Patch Set 30: (3 comments) http://gerrit.ovirt.org/#/c/22537/30/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/gluster/SubTabVolumeBrickView.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/gluster/SubTabVolumeBrickView.java: Line 66: } Line 67: }; Line 68: getTable().addColumn(directoryColumn, constants.brickDirectoryVolumeBrick(), "400px"); //$NON-NLS-1$ Line 69: Line 70: getTable().addColumn(new ProgressBarColumn<GlusterBrickEntity>() { Use PercentColumn Line 71: Line 72: @Override Line 73: protected Integer getProgressValue(GlusterBrickEntity object) { Line 74: BrickProperties brickProperties = object.getBrickProperties(); Line 71: Line 72: @Override Line 73: protected Integer getProgressValue(GlusterBrickEntity object) { Line 74: BrickProperties brickProperties = object.getBrickProperties(); Line 75: return (int)(((float)((brickProperties.getTotalSize() - brickProperties.getFreeSize()))/ ((float)(brickProperties.getTotalSize()))) * 100); why this needs to be converted to float? Line 76: } Line 77: Line 78: @Override Line 79: protected String getProgressText(GlusterBrickEntity object) { Line 79: protected String getProgressText(GlusterBrickEntity object) { Line 80: BrickProperties brickProperties = object.getBrickProperties(); Line 81: if(brickProperties == null) { Line 82: return ConstantsManager.getInstance().getConstants().unknown(); Line 83: } if not null, you could do super.getProgressText( Line 84: return ConstantsManager.getInstance().getMessages().volumeCapacityUsedPercentage((int)(((float)((brickProperties.getTotalSize() - brickProperties.getFreeSize()))/ ((float)(brickProperties.getTotalSize()))) * 100)); Line 85: } Line 86: }, constants.volumeCapacity(), "100px");//$NON-NLS-1$ Line 87: -- To view, visit http://gerrit.ovirt.org/22537 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04151d78838c1398cff42c84104e21d61d9c7747 Gerrit-PatchSet: 30 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: Ramesh N <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: Shubhendu Tripathi <[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
