Daniel Erez has posted comments on this change.
Change subject: webadmin: Consolidated move & copy disk availability checks
......................................................................
Patch Set 1: (4 inline comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/disks/DiskListModel.java
Line 461:
Line 462: NGuid datacenterId = ((DiskImage)
firstDisk).getStoragePoolId();
Line 463:
Line 464: for (Disk disk : disks)
Line 465: {
formatter
Line 466: if (!isCopyAllowed && !isMoveAllowed ||
disk.getDiskStorageType() != DiskStorageType.IMAGE) {
Line 467: disableMoveAndCopyCommands();
Line 468: return;
Line 469: }
Line 462: NGuid datacenterId = ((DiskImage)
firstDisk).getStoragePoolId();
Line 463:
Line 464: for (Disk disk : disks)
Line 465: {
Line 466: if (!isCopyAllowed && !isMoveAllowed ||
disk.getDiskStorageType() != DiskStorageType.IMAGE) {
please wrap 'isCopyAllowed' and 'isMoveAllowed' in brackets
Line 467: disableMoveAndCopyCommands();
Line 468: return;
Line 469: }
Line 470:
Line 469: }
Line 470:
Line 471: DiskImage diskImage = (DiskImage) disk;
Line 472: if (diskImage.getImageStatus() != ImageStatus.OK ||
!datacenterId.equals(diskImage.getStoragePoolId()))
Line 473: {
formatter
Line 474: disableMoveAndCopyCommands();
Line 475: return;
Line 476: }
Line 477:
Line 474: disableMoveAndCopyCommands();
Line 475: return;
Line 476: }
Line 477:
Line 478: if (disk.getVmEntityType() == VmEntityType.TEMPLATE) {
you can move it up to loop start..
Line 479: isMoveAllowed = false;
Line 480: }
Line 481: else {
Line 482: isCopyAllowed = false;
--
To view, visit http://gerrit.ovirt.org/15783
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ieb3c388aecc5b007a76c54ed0d41105bc28ebb51
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches