Moti Asayag has posted comments on this change. Change subject: webadmin: Support 'Upgrade' in action items ......................................................................
Patch Set 5: (4 comments) https://gerrit.ovirt.org/#/c/41023/5/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java: Line 979: getEditHostCommand().setIsExecutionAllowed(canExecuteCommand(VdcActionType.UpdateVds)); > extract to an 'updateActionsAvailability' method can't find such method. Line 1005: { Line 1006: setHasReinstallAlertMaintenance(true); Line 1007: } Line 1008: Line 1009: getUpgradeHostCommand().setIsExecutionAllowed(getEntity().isUpdateAvailable() > same. we count on our developers to be very perceptive Line 1010: && canExecuteCommand(VdcActionType.UpgradeHost)); Line 1011: Line 1012: setNonOperationalReasonEntity((getEntity().getNonOperationalReason() == NonOperationalReason.NONE ? null Line 1013: : (NonOperationalReason) getEntity().getNonOperationalReason())); Line 1088: if > consider a ternary statement instead... considered and declined. The reason: readability. model = host.getVdsType() == VDSType.oVirtNode ? new UpgradeModel(host) : new UpgradeConfirmationModel(host); isn't clearer than the existing code. I'd restrict the usage of ternary statement to simple cases (which doesn't involve instantiation) https://gerrit.ovirt.org/#/c/41023/5/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java: Line 1511: > same consideration same,but due to the duplicity i'll extract this into a method. -- To view, visit https://gerrit.ovirt.org/41023 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7e9053aec1cb4aa69e5b35c882b8ac71224f6a9b Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Moti Asayag <masa...@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