Gilad Chaplik has uploaded a new change for review. Change subject: webadmin: no compat version for exported vm ......................................................................
webadmin: no compat version for exported vm Due to a change in the backend side, while fetching an exported vm, the compatibility version is empty. Therefore the disks subtab in the export dialog was empty (there is a check for hot_plug_enabled which depends on compat_version, this subtab is reused also in the disk main tab). not showing any disk data, prevents the user from changing disk allocation policy, destination SD and quota. Change-Id: If72968b984ad1637e879eea5e64dbc38a58828ed Signed-off-by: Gilad Chaplik <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java 1 file changed, 14 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/00/9100/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java index baf6847..c630709 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmDiskListModel.java @@ -1099,17 +1099,19 @@ protected void UpdateIsDiskHotPlugAvailable() { VM vm = getEntity(); - Version clusterCompatibilityVersion = vm.getvds_group_compatibility_version() != null - ? vm.getvds_group_compatibility_version() : new Version(); - - AsyncDataProvider.IsHotPlugAvailable(new AsyncQuery(this, - new INewAsyncCallback() { - @Override - public void OnSuccess(Object target, Object returnValue) { - VmDiskListModel model = (VmDiskListModel) target; - model.setIsDiskHotPlugSupported((Boolean) returnValue); - } - }), clusterCompatibilityVersion.toString()); + Version clusterCompatibilityVersion = vm.getvds_group_compatibility_version(); + if (clusterCompatibilityVersion == null) { + setIsDiskHotPlugSupported(false); + } else { + AsyncDataProvider.IsHotPlugAvailable(new AsyncQuery(this, + new INewAsyncCallback() { + @Override + public void OnSuccess(Object target, Object returnValue) { + VmDiskListModel model = (VmDiskListModel) target; + model.setIsDiskHotPlugSupported((Boolean) returnValue); + } + }), clusterCompatibilityVersion.toString()); + } } protected void UpdateLiveStorageMigrationEnabled() @@ -1120,7 +1122,7 @@ @Override public void OnSuccess(Object target, Object returnValue) { VmDiskListModel model = (VmDiskListModel) target; - VM vm = (VM) model.getEntity(); + VM vm = model.getEntity(); storage_pool dataCenter = (storage_pool) returnValue; Version dcCompatibilityVersion = dataCenter.getcompatibility_version() != null -- To view, visit http://gerrit.ovirt.org/9100 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If72968b984ad1637e879eea5e64dbc38a58828ed Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
