Daniel Erez has posted comments on this change. Change subject: frontend: created instance image widget ......................................................................
Patch Set 7: (4 comments) http://gerrit.ovirt.org/#/c/36063/7//COMMIT_MSG Commit Message: Line 8: Line 9: Created a new instance images editor which is an AddRemoveRowWidget (similar to Line 10: network profiles) . Line 11: Line 12: This editor contains one line per one disk. Each line contains two buttons > yes, basically yes. But this lets you also edit the disks of the already cr ok, so we'll probably keep it for later cleanup Line 13: (create and attach) for create/attach a disk. If the disk is already defined Line 14: for the specific line (either newly after clicking create/attach or the VM Line 15: already has this disk), the edit button is shown. Line 16: http://gerrit.ovirt.org/#/c/36063/7/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/AddRemoveRowWidget.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/AddRemoveRowWidget.java: Line 230: new ClickHandler() { Line 231: Line 232: @Override Line 233: public void onClick(ClickEvent event) { Line 234: if (vetoRemoveWidget(item, value, widget)) { > heh, yeah, better fitting to our culture would be "-1removeWidget()" but it better fitting but won't compile though :D Line 235: return; Line 236: } Line 237: Line 238: doRemoveItem(item, value, widget); http://gerrit.ovirt.org/#/c/36063/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/InstanceImageLineModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/InstanceImageLineModel.java: Line 70: String diskName = disk.getDiskAlias(); Line 71: String size = Long.toString(disk.getSize()); Line 72: Line 73: if (disk.getDiskStorageType() == Disk.DiskStorageType.IMAGE) { Line 74: size = Long.toString(disk.getSize() / (1024 * 1024 * 1024)); > ok, but it required to move the getSizeInGigabytes() from DiskImageBase to you can safely cast to DiskImage in this case and use it.. Moving it to Disk would be confusing as it's relevant only for images (and not luns...) Line 75: } Line 76: Line 77: String type; Line 78: if (diskExists) { http://gerrit.ovirt.org/#/c/36063/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/InstanceImagesModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/InstanceImagesModel.java: Line 80: callback.removeApproved(false); Line 81: } Line 82: Line 83: private void hideRemoveDiskAndShowEditVm() { Line 84: getParentListModel().setWindow(null); > It is a regular setWindow(null) - e.g. hides the currently shown dialog whi Indeed, too much of abuse :) Line 85: getParentListModel().setWindow(getUnitVmModel()); Line 86: } Line 87: Line 88: @Override -- To view, visit http://gerrit.ovirt.org/36063 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4bcaa1e40841aa12e64708ec82afdb9daec9fb7f Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches