Alexey Chub has uploaded a new change for review. Change subject: webadmin: Ensure "upgrade" alert on host general tab appears correctly (#839336) ......................................................................
webadmin: Ensure "upgrade" alert on host general tab appears correctly (#839336) https://bugzilla.redhat.com/839336 Change-Id: I57002308a192c81e84f9730564d41fb03309d006 Signed-off-by: Alexey Chub <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java 1 file changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/07/9007/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java index 39f6d41..2091c48 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java @@ -114,7 +114,7 @@ privateGoToEventsCommand = value; } - private boolean isEntityChanged; + private boolean updateUpgradeAlert; @Override public VDS getEntity() @@ -126,7 +126,9 @@ public void setEntity(Object value) { VDS vds = (VDS) value; - isEntityChanged = vds == null || getEntity() == null || !vds.getId().equals(getEntity().getId()); + updateUpgradeAlert = vds == null || getEntity() == null + || !vds.getId().equals(getEntity().getId()) + || !vds.getstatus().equals(getEntity().getstatus()); super.setEntity(value); } @@ -809,6 +811,7 @@ if (e.PropertyName.equals("net_config_dirty") || e.PropertyName.equals("status") //$NON-NLS-1$ //$NON-NLS-2$ || e.PropertyName.equals("spm_status") || e.PropertyName.equals("vm_active")) //$NON-NLS-1$ //$NON-NLS-2$ { + updateUpgradeAlert = true; UpdateAlerts(); } @@ -848,7 +851,11 @@ private void UpdateAlerts() { setHasAnyAlert(false); - setHasUpgradeAlert(false); + + if (updateUpgradeAlert) { + setHasUpgradeAlert(false); + } + setHasManualFenceAlert(false); setHasNoPowerManagementAlert(false); setHasReinstallAlertNonResponsive(false); @@ -891,7 +898,7 @@ // TODO: Need to come up with a logic to show the Upgrade action-item. // Currently, this action-item will be shown for all oVirts assuming there are // available oVirt ISOs that are returned by the backend's GetoVirtISOs query. - else if (getEntity().getvds_type() == VDSType.oVirtNode && isEntityChanged) + else if (getEntity().getvds_type() == VDSType.oVirtNode && updateUpgradeAlert) { AsyncDataProvider.GetoVirtISOsList(new AsyncQuery(this, new INewAsyncCallback() { -- To view, visit http://gerrit.ovirt.org/9007 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I57002308a192c81e84f9730564d41fb03309d006 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexey Chub <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
