Tomas Jelinek has posted comments on this change.

Change subject: frontend: spice: expose support to control the user data 
transfer
......................................................................


Patch Set 15:

(2 comments)

I'd say you miss the corresponding logic from TemplateVmModelBehavior (edit 
template).

Also I'd say you need the to expose this settings to the console options dialog 
(when you right click the VM and pick "Console Options"). Key classes to look 
for: ConsolePopupPresenterWidget, ConsoleOptionsFrontendPersisterImpl

http://gerrit.ovirt.org/#/c/26244/15/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java:

Line 1930:         
Version.v3_3.compareTo(getSelectedCluster().getcompatibility_version()) <= 0;
Line 1931: 
Line 1932:         getBehavior().enableSinglePCI(isLinux && isQxl && 
clusterSupportsSinglePci);
Line 1933: 
Line 1934:         if (isQxl && getSelectedCluster() != null) {
imagine this flow:
 
1: pick SPICE and select the SpiceFileXferEnabled and SpiceFileXferEnabled

2: pick VNC.

Than this check will not pass and the two checkboxes will still be there and 
enabled since the condition did not pass.

I'd recommend something like this:
boolean spiceFileXferEnabled = isQxl && getSelectedCluster() != null && 
AsyncDataProvider.isSpiceFileXferToggleSupported(clusterV
ersion);

than  getSpiceFileXferEnabled().setIsChangable(spiceFileXferToggle); 
this will set the getSpiceFileXferEnabled() always to correct value.
Line 1935:             String clusterVersion = 
getSelectedCluster().getcompatibility_version().toString();
Line 1936: 
Line 1937:             boolean spiceFileXferToggle =  
AsyncDataProvider.isSpiceFileXferToggleSupported(clusterVersion);
Line 1938:             
getSpiceFileXferEnabled().setIsChangable(spiceFileXferToggle);


Line 1935:             String clusterVersion = 
getSelectedCluster().getcompatibility_version().toString();
Line 1936: 
Line 1937:             boolean spiceFileXferToggle =  
AsyncDataProvider.isSpiceFileXferToggleSupported(clusterVersion);
Line 1938:             
getSpiceFileXferEnabled().setIsChangable(spiceFileXferToggle);
Line 1939:             
getSpiceFileXferEnabled().setIsAvailable(spiceFileXferToggle);
we are trying not to hide (setIsAvailable()) the fields but make them not 
editable (setIsChangable) with a proper tooltip why is it not editable 
(setChangeProhibitionReason()) which should give the user a better 
understanding about why is some option not available.

So, in this case it should be something like:
if (!spiceFileXferToggle) {
getSpiceFileXferEnabled().setChangeProhibitionReason(ConstantsManager.getInstance().getMessages()....);
}
getSpiceFileXferEnabled().setIsChangable(spiceFileXferToggle);

Please note that the order is important - first you need to 
setChangeProhibitionReason and only than
Line 1940: 
Line 1941:             boolean spiceCopyPasteToggle =  
AsyncDataProvider.isSpiceCopyPasteToggleSupported(clusterVersion);
Line 1942:             
getSpiceCopyPasteEnabled().setIsChangable(spiceCopyPasteToggle);
Line 1943:             
getSpiceCopyPasteEnabled().setIsAvailable(spiceCopyPasteToggle);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99f9f2f878171746c613598d80fdc9fdd3208ed2
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to