Shahar Havivi has uploaded a new change for review. Change subject: UI: datacenter/cluster running on host behavior ......................................................................
UI: datacenter/cluster running on host behavior When changing datacenter/cluster we need to fall back to "run on any host" selection and not stay with "run on specific host" if it was previously selected. Change-Id: I5ca584e0c98a4e9d3823b0333b92bff93db20872 Bug-Url: https://bugzilla.redhat.com/1136228 Signed-off-by: Shahar Havivi <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/76/35876/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java index 6fc94c6..2bc979b 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java @@ -10,7 +10,6 @@ import java.util.List; import java.util.Set; import java.util.TreeSet; - import org.ovirt.engine.core.common.TimeZoneType; import org.ovirt.engine.core.common.businessentities.ActionGroup; import org.ovirt.engine.core.common.businessentities.ArchitectureType; @@ -45,7 +44,6 @@ import org.ovirt.engine.ui.frontend.AsyncQuery; import org.ovirt.engine.ui.frontend.Frontend; import org.ovirt.engine.ui.frontend.INewAsyncCallback; -import org.ovirt.engine.ui.uicommonweb.models.templates.LatestVmTemplate; import org.ovirt.engine.ui.uicommonweb.Linq; import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider; import org.ovirt.engine.ui.uicommonweb.models.EntityModel; @@ -54,6 +52,7 @@ import org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType; import org.ovirt.engine.ui.uicommonweb.models.hosts.numa.NumaSupportModel; import org.ovirt.engine.ui.uicommonweb.models.hosts.numa.VmNumaSupportModel; +import org.ovirt.engine.ui.uicommonweb.models.templates.LatestVmTemplate; import org.ovirt.engine.ui.uicommonweb.models.vms.instancetypes.InstanceTypeManager; import org.ovirt.engine.ui.uicompat.ConstantsManager; import org.ovirt.engine.ui.uicompat.UIConstants; @@ -369,8 +368,11 @@ } + boolean firstRun = true; protected void doChangeDefautlHost(Guid hostGuid) { - if (hostGuid != null) + // Only set the specific/any host to run on in the first time + // Second time (when the user change cluster/datacenter we leave the default (which is any host) + if (hostGuid != null && firstRun) { Guid vdsId = hostGuid; if (getModel().getDefaultHost().getItems() != null) @@ -384,6 +386,7 @@ { getModel().getIsAutoAssign().setEntity(true); } + firstRun = false; } protected void updateDefaultHost() -- To view, visit http://gerrit.ovirt.org/35876 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ca584e0c98a4e9d3823b0333b92bff93db20872 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
