Martin Betak has uploaded a new change for review. Change subject: frontend: Fix display of custom properties on edit VM ......................................................................
frontend: Fix display of custom properties on edit VM In ExistingVmModelBehavior the custom properties sheet was not deserialized from entity to corresponding widget. Also on backend when we were dealing with VM that has next runtime configuration the OvfImport did copy the userDefined and predefined properties but not the aggregate customProperties. Change-Id: I523c61595911138b07ee74563239dd80ccb8cc99 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128433 Signed-off-by: Martin Betak <[email protected]> --- M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/73/31773/1 diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java index cc7bb2a..76726d2 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java @@ -16,6 +16,7 @@ import org.ovirt.engine.core.common.businessentities.VmDevice; import org.ovirt.engine.core.common.businessentities.VmStatic; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; +import org.ovirt.engine.core.common.utils.customprop.VmPropertiesUtils; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.utils.linq.LinqUtils; import org.ovirt.engine.core.utils.linq.Predicate; @@ -163,6 +164,11 @@ } } + // {@link VM#predefinedProperties} and {@link VM#userDefinedProperties} + // are being set in the above alias handling, we need to update custom properties + // to keep them consistent + _vm.setCustomProperties(VmPropertiesUtils.getInstance().customProperties(_vm.getPredefinedProperties(), _vm.getUserDefinedProperties())); + node = content.SelectSingleNode(OvfProperties.APPLICATIONS_LIST); if (node != null) { if (StringUtils.isNotEmpty(node.innerText)) { diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java index 16ad95e..3d41b70 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java @@ -156,6 +156,8 @@ getModel().getCpuPinning().setEntity(vm.getCpuPinning()); + getModel().getCustomPropertySheet().deserialize(vm.getCustomProperties()); + if (isHotSetCpuSupported()) { // cancel related events while fetching data getModel().getTotalCPUCores().getEntityChangedEvent().removeListener(getModel()); -- To view, visit http://gerrit.ovirt.org/31773 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I523c61595911138b07ee74563239dd80ccb8cc99 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Betak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
