Change in ovirt-engine[master]: webadmin: changeing vm_type and os_type did reset the dialog

tjelinek at redhat.com tjelinek at redhat.com
Fri Sep 5 07:57:39 UTC 2014


Tomas Jelinek has submitted this change and it was merged.

Change subject: webadmin: changeing vm_type and os_type did reset the dialog
......................................................................


webadmin: changeing vm_type and os_type did reset the dialog

For change of os type:
The problem was that the change of the vm_type in the vm dialog triggered the
InstanceTypeManager.updateFields().

It was not correct since this caused the whole dialog to be re-inited from the
selected instance type/template (depending on the actual selection) and that
should happen only after "big" changes like cluster change which changes
availability of some fields.

Since the vm type only provides some defaults for the fields and not the
availability of the fields, there is no need to go through the instance type
manager - just simply set the fields up.

For the os type:
Similar but a bit more tricky. There are some fields which are actually
provided from instance type. So if the os type changes, in case the selected
instance type is not custom, it should set the "IsChangable" flag and let the
instance type manager to copy the corresponding fields. But not all to avoid
the dialog will be reset again - only the ones related to the os change.

Change-Id: I5859ca02ddcbeb60583a0e79b94f7b9f2647596a
Bug-Url: https://bugzilla.redhat.com/1125344
Signed-off-by: Tomas Jelinek <tjelinek at redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeManager.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/NewPoolInstanceTypeManager.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/NewVmInstanceTypeManager.java
6 files changed, 95 insertions(+), 37 deletions(-)

Approvals:
  Tomas Jelinek: Verified; Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/31892
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5859ca02ddcbeb60583a0e79b94f7b9f2647596a
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkobzik at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmoskovc at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list