Liron Ar has posted comments on this change. Change subject: webadmin: block operations on ovf disks ......................................................................
Patch Set 4: (2 comments) http://gerrit.ovirt.org/#/c/23566/4/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/disks/DiskListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/disks/DiskListModel.java: Line 503: Disk disk = (Disk) getSelectedItem(); Line 504: ArrayList<Disk> disks = getSelectedItems() != null ? (ArrayList<Disk>) getSelectedItems() : null; Line 505: boolean shouldAllow = true; Line 506: if (disk != null) { Line 507: shouldAllow = !disk.isOvfStore() && !(disk.getDiskStorageType() == DiskStorageType.IMAGE && > Please keep the 'isDiskLocked' flag and add 'isOvfDisk' flag. I don't think that we should keep it atm. that boolean is used only locally, having the ovf check first saves us performing a type check and a case when we can already conclude (as it'll be done also for luns). why do you think that we should keep the isDiskLocked? Line 508: ((DiskImage) disk).getImageStatus() == ImageStatus.LOCKED); Line 509: } Line 510: Line 511: getNewCommand().setIsExecutionAllowed(true); Line 508: ((DiskImage) disk).getImageStatus() == ImageStatus.LOCKED); Line 509: } Line 510: Line 511: getNewCommand().setIsExecutionAllowed(true); Line 512: getEditCommand().setIsExecutionAllowed(disk != null && disks != null && disks.size() == 1 && shouldAllow); > Replace with: !isDiskLocked && !isOvfDisk answered on the other comment Line 513: getRemoveCommand().setIsExecutionAllowed(disks != null && disks.size() > 0 && isRemoveCommandAvailable()); Line 514: getScanAlignmentCommand().setIsExecutionAllowed( Line 515: disks != null && disks.size() > 0 && isScanAlignmentCommandAvailable()); Line 516: getExportCommand().setIsExecutionAllowed(isExportCommandAvailable()); -- To view, visit http://gerrit.ovirt.org/23566 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I379d10be9b6ee1cbda99d85f5dc02af78695a65c Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
