anmolbabu has posted comments on this change. Change subject: webadmin : Volume Capacity UI - Part2 ......................................................................
Patch Set 10: (7 comments) http://gerrit.ovirt.org/#/c/23502/10/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/utils/TimeUnitConverter.java File frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/utils/TimeUnitConverter.java: Line 23: Years(6 , 12); //1 year = 12 months.So,this assumes 12 * 30 = 360 days as 1 year Line 24: Line 25: private static List<Pair<TimeUnitConverter.TimeUnit, Long>> timeUnits = new ArrayList<Pair<TimeUnitConverter.TimeUnit, Long>>(); Line 26: /* Line 27: * List of triplet required because order is required and this ordering of units is independent of weight and to facilitate > triplet? Sorry,I changed it to pair as per your comment but forgot to change it in the comment.I'll do that now. Line 28: * easy mapping between the triplet entities like unit name,weight and order. Line 29: */ Line 30: Line 31: private long value; http://gerrit.ovirt.org/#/c/23502/10/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java: Line 910: } Line 911: }); Line 912: } Line 913: Line 914: private GlusterVolumeEntity currentEntity; > could be volumeEntityToRefresh Done Line 915: Line 916: @Override Line 917: protected String getListName() { Line 918: return "VolumeListModel"; //$NON-NLS-1$ http://gerrit.ovirt.org/#/c/23502/10/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 93: Line 94: refreshCell.setButtonDefinition(new WebAdminButtonDefinition<GlusterVolumeEntity>(constants.volumeCapacity()) { Line 95: @Override Line 96: public void onClick(List<GlusterVolumeEntity> selectedItems) { Line 97: if(selectedItems == null) { > also Done Line 98: return; Line 99: } Line 100: getMainModel().setCurrentEntity(selectedItems.get(0)); Line 101: super.onClick(selectedItems); Line 116: }; Line 117: capacityColumn.setHorizontalAlignment(HorizontalAlignmentConstant.startOf(Direction.LTR)); Line 118: volumeCapacityCompositeList.add(capacityColumn); Line 119: Line 120: Column<GlusterVolumeEntity, GlusterVolumeEntity> capacityClockColumn = new Column<GlusterVolumeEntity, GlusterVolumeEntity>(refreshCell) { > capacityRefreshColumn Done Line 121: @Override Line 122: public GlusterVolumeEntity getValue(GlusterVolumeEntity object) { Line 123: return object; Line 124: } http://gerrit.ovirt.org/#/c/23502/10/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/CompositeVolumeCapacityColumn.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/CompositeVolumeCapacityColumn.java: Line 7: Line 8: import com.google.gwt.cell.client.HasCell; Line 9: import com.google.gwt.user.cellview.client.Column; Line 10: Line 11: public class CompositeVolumeCapacityColumn<T extends Serializable> extends Column<GlusterVolumeEntity, GlusterVolumeEntity> { > VolumeCapacityCompositeColumn Done Line 12: Line 13: public CompositeVolumeCapacityColumn(List<HasCell<GlusterVolumeEntity, ?>> hasCells) { Line 14: super(new VolumeCapacityCompositeCell(hasCells)); Line 15: } http://gerrit.ovirt.org/#/c/23502/10/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityCompositeCell.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityCompositeCell.java: Line 24: public void render(Context context, GlusterVolumeEntity value, SafeHtmlBuilder sb) { Line 25: if((value.getAdvancedDetails() == null) || (!isVisible(value.getAdvancedDetails().getCapacityInfo()))) { Line 26: return; Line 27: } Line 28: sb.appendHtmlConstant("<table style=\"margin:0 auto\"><tr>"); //$NON-NLS-1$ > is it possible to set the width here instead of defining a new css class fo Tried.But couldn't.Can you please provide a reference for the same Line 29: Iterator<HasCell<GlusterVolumeEntity, ?>> iterator = hasCells.iterator(); Line 30: while (iterator.hasNext()) { Line 31: render(context, value, sb, iterator.next()); Line 32: } http://gerrit.ovirt.org/#/c/23502/10/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityRefreshCell.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/VolumeCapacityRefreshCell.java: Line 35: this.buttonDefinition = buttonDefinition; Line 36: } Line 37: Line 38: private ApplicationTemplates templates = ClientGinjectorProvider.getApplicationTemplates(); Line 39: private static CommonApplicationResources resources = GWT.create(CommonApplicationResources.class); > ClientGinjectorProvider().getApplicationResources() Done Line 40: private ApplicationMessages messages = ClientGinjectorProvider.getApplicationMessages(); Line 41: Line 42: private ActionButtonDefinition<GlusterVolumeEntity> buttonDefinition; Line 43: -- To view, visit http://gerrit.ovirt.org/23502 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I983daf32966527cdfa7773e07aa055a24519fbe2 Gerrit-PatchSet: 10 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
