Arik Hadas has uploaded a new change for review. Change subject: userportal: wrong display type on run once ......................................................................
userportal: wrong display type on run once This patch solves a bug that when running a VM using 'run once' mode from the user-portal, the VM is starting with its default display type even though other display type was selected for it from the 'run once' dialog. This patch also fix the default selection of the display type in the 'run once' dialog of user-portal to be the default display type of the VM (there was no default selection of display type in the dialog before). Change-Id: I665ab4578fea13fce6a22b77ee0c5d627b5c235b Bug-Url: https://bugzilla.redhat.com/907776 Signed-off-by: Arik Hadas <aha...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/11790/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java index 6804efe..e4d2a78 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java @@ -770,6 +770,10 @@ tempVar2.setEntity(DisplayType.qxl); EntityModel qxlProtocol = tempVar2; + boolean isVncSelected = vm.getDefaultDisplayType() == DisplayType.vnc; + model.getDisplayConsole_Vnc_IsSelected().setEntity(isVncSelected); + model.getDisplayConsole_Spice_IsSelected().setEntity(!isVncSelected); + ArrayList<EntityModel> items = new ArrayList<EntityModel>(); items.add(vncProtocol); items.add(qxlProtocol); @@ -946,6 +950,11 @@ EntityModel displayProtocolSelectedItem = (EntityModel) model.getDisplayProtocol().getSelectedItem(); param.setUseVnc((DisplayType) displayProtocolSelectedItem.getEntity() == DisplayType.vnc); + if ((Boolean) model.getDisplayConsole_Vnc_IsSelected().getEntity() + || (Boolean) model.getDisplayConsole_Spice_IsSelected().getEntity()) + { + param.setUseVnc((Boolean) model.getDisplayConsole_Vnc_IsSelected().getEntity()); + } Frontend.RunAction(VdcActionType.RunVmOnce, param, new IFrontendActionAsyncCallback() { -- To view, visit http://gerrit.ovirt.org/11790 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I665ab4578fea13fce6a22b77ee0c5d627b5c235b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches