Kanagaraj M has posted comments on this change.

Change subject: webadmin : Volume and Brick Capacity UI
......................................................................


Patch Set 31:

(4 comments)

http://gerrit.ovirt.org/#/c/22537/31/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabVolumeView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabVolumeView.java:

Line 126:             @Override
Line 127:             public GlusterVolumeEntity getValue(GlusterVolumeEntity 
object) {
Line 128:                 return object;
Line 129:             }
Line 130:         }, constants.volumeCapacity(), "100px");//$NON-NLS-1$
60px
Line 131: 
Line 132:         getTable().addColumn(new 
VolumeActivityColumn<GlusterVolumeEntity>(new 
VolumeActivityCompositeCell<GlusterTaskSupport>(compositeList) {
Line 133:                 @Override
Line 134:                 protected boolean isVisible(GlusterTaskSupport value) 
{


http://gerrit.ovirt.org/#/c/22537/31/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 70: 
Line 71:         getTable().addColumn(new PercentColumn<GlusterBrickEntity>() {
Line 72:             @Override
Line 73:             protected Integer getProgressValue(GlusterBrickEntity 
object) {
Line 74:                 BrickProperties brickProperties = 
object.getBrickProperties();
if brickProperties is null, 0 should be returned

And the text on the progress bar could be "?" if its null
Line 75:                 return (int)(((brickProperties.getTotalSize() - 
brickProperties.getFreeSize())/ (brickProperties.getTotalSize())) * 100);
Line 76:             }
Line 77:         }, constants.volumeCapacity(), "100px");
Line 78: 


Line 73:             protected Integer getProgressValue(GlusterBrickEntity 
object) {
Line 74:                 BrickProperties brickProperties = 
object.getBrickProperties();
Line 75:                 return (int)(((brickProperties.getTotalSize() - 
brickProperties.getFreeSize())/ (brickProperties.getTotalSize())) * 100);
Line 76:             }
Line 77:         }, constants.volumeCapacity(), "100px");
60px
Line 78: 
Line 79:         getTable().addColumn(new 
VolumeActivityColumn<GlusterBrickEntity>(getActivityCell(constants)),
Line 80:                 constants.activitiesOnVolume(), "100px"); //$NON-NLS-1$
Line 81: 


http://gerrit.ovirt.org/#/c/22537/31/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityCell.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityCell.java:

Line 31:     }
Line 32: 
Line 33:     private String getProgressText(GlusterVolumeSizeInfo sizeStats) {
Line 34:         if(sizeStats == null) {
Line 35:             return 
ConstantsManager.getInstance().getConstants().unknown();
"unknown" might be bigger to accommodate, so use "?"
Line 36:         } else {
Line 37:             return 
ConstantsManager.getInstance().getMessages().volumeCapacityUsedPercentage((int)((sizeStats.getUsedSize().floatValue()
 / sizeStats.getTotalSize().floatValue()) * 100));
Line 38:         }
Line 39:     }


-- 
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: 31
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

Reply via email to