anmolbabu has posted comments on this change.
Change subject: [WIP]webadmin : Volume Capacity column in volume tab
......................................................................
Patch Set 22:
(5 comments)
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/TimeUnitConverter.java
Line 68: Pair<Long , String> timePair = new Pair<Long, String>(inValue,
outUnit.toString());
Line 69: return timePair;
Line 70: }
Line 71:
Line 72: public static void main(String[] args) {
:) ya I'll remove it
Line 73: Pair<Long , String> result =
TimeUnitConverter.convert(100000L, TimeUnit.Seconds, TimeUnit.Days);
Line 74: System.out.println(result.getFirst() + result.getSecond());
Line 75: }
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabVolumeView.java
Line 137:
Line 138: volumeCapacityCompositeList.add(new Column(new
VolumeCapacityClockCell(getMainModel())) {
Line 139: @Override
Line 140: public GlusterVolumeSizeInfo getValue(Object object) {
Line 141: // TODO Auto-generated method stub
Done
Line 142: return
((GlusterVolumeEntity)object).getAdvancedDetails().getCapacityInfo();
Line 143: }
Line 144: });
Line 145:
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/BrickCapacityCell.java
Line 24:
Line 25: BrickDetails details = new BrickDetails();
Line 26: details.setBrickProperties(properties);
Line 27: value.setBrickDetails(details);
Line 28: //return;
No currently I am populating the dummy values as I am not getting those values
from backend currently. Otherwise the above statements are to be replced by the
return statement
Line 29: }
Line 30: int progress = getProgress(value.getBrickProperties());
Line 31: String progressText =
getProgressText(value.getBrickProperties());
Line 32: String color = progress < 70 ? "#669966" : progress < 95 ?
"#FF9900" : "#FF0000"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityCell.java
Line 20: public void render(Context context, GlusterVolumeSizeInfo object,
SafeHtmlBuilder sb) {
Line 21: Integer progressValue = getProgressValue(object);
Line 22: Integer progress = progressValue != null ? progressValue : 0;
Line 23: // Choose color by progress
Line 24: String color = progress < 70 ? "#669966" : progress < 95 ?
"#FF9900" : "#FF0000"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Hmm,not sure need to discuss this.However,currently RHEVM has fixed ranges for
memory usage,cpu usage in host tab.
Line 25:
Line 26: String sizeString = getProgressText(object);
Line 27:
Line 28: SafeHtml safeHtml = templates.progressBar(progress,
sizeString, color);
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityClockCell.java
Line 71: } else {
Line 72: time = timeInterval;
Line 73: timeUnit = TimeUnit.SECONDS.toString();
Line 74: }
Line 75: */
Done
Line 76: time = l - new Date().getTime();
Line 77: timeUnit = "SECONDS";//$NON-NLS-1$
Line 78: }
Line 79:
--
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: 22
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