Tal Nisan has posted comments on this change.

Change subject: webadmin: Enabling paused VM's disk editing.
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/37485/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java:

Line 619: 
Line 620:         getAttachCommand().setIsExecutionAllowed(true);
Line 621: 
Line 622:         getEditCommand().setIsExecutionAllowed(disk != null && 
isSingleDiskSelected() && !isDiskLocked(disk) &&
Line 623:                 (isVmDown() || !disk.getPlugged() || 
(isExtendImageSizeSupported() && isExtendImageSizeEnabled()) || 
getEntity().getStatus().equals(VMStatus.Paused)));
getEntity() might be null in certain scenarios, plus all this condition has 
become too long and frustrating, extract it to a method - isDiskEditable() or 
something like this
Line 624: 
Line 625:         
getRemoveCommand().setIsExecutionAllowed(atLeastOneDiskSelected() && 
isRemoveCommandAvailable());
Line 626: 
Line 627:         
getMoveCommand().setIsExecutionAllowed(atLeastOneDiskSelected()


-- 
To view, visit http://gerrit.ovirt.org/37485
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib0d3ac2000c86078ce4fd4ff6d47e804b8848167
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to