Ayal Baron has posted comments on this change.
Change subject: webadmin: VM subtab disks corrections (#846551)
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/storage/VMsTree.java
Line 134:
Line 135: for (Disk disk : disks) {
Line 136: HorizontalPanel panel = new HorizontalPanel();
Line 137:
Line 138: ImageResource image = resources.diskImage();
I'm assuming this is the image (graphics) to display? Is it the same for
diskImage and LUN?
Line 139: String name = disk.getDiskAlias();
Line 140:
Line 141: addItemToPanel(panel, new Image(image), "25px");
//$NON-NLS-1$
Line 142: addTextBoxToPanel(panel, new TextBoxLabel(), name, "");
//$NON-NLS-1$
Line 145:
Line 146: Double actualSize =
Line 147: disk.getDiskStorageType() ==
DiskStorageType.IMAGE ? ((DiskImage) disk).getActualDiskWithSnapshotsSize()
Line 148: : (long) (((LunDisk)
disk).getLun().getDeviceSize() * Math.pow(1024, 3));
Line 149: Long virtualSize = disk.getDiskStorageType() ==
DiskStorageType.IMAGE ? ((DiskImage) disk).getsize() :
you're asking the same question twice and for LUNs running the same method
twice for no reason (and code is cluttered this way).
Line 150: (long) (((LunDisk) disk).getLun().getDeviceSize()
* Math.pow(1024, 3));
Line 151:
Line 152: addValueLabelToPanel(panel, new
DiskSizeLabel<Long>(DiskSizeUnit.BYTE), virtualSize, "110px"); //$NON-NLS-1$
Line 153: addValueLabelToPanel(panel, new
DiskSizeLabel<Double>(DiskSizeUnit.BYTE), actualSize, "110px"); //$NON-NLS-1$
--
To view, visit http://gerrit.ovirt.org/7197
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I059bf7a8b18232640eaa7f2f5c49ee1cbc6d5486
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches