Tomas Jelinek has posted comments on this change.

Change subject: ui: edit VM override user xql falg
......................................................................


Patch Set 2:

(3 comments)

You need to adjust also NewPoolInstanceTypeManager the same way as 
NewVmInstanceTypeManager

http://gerrit.ovirt.org/#/c/29240/2/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 2116: 
Line 2117:         return isLinux && isQxl && clusterSupportsSinglePci;
Line 2118:     }
Line 2119: 
Line 2120:     private void handleQxlClusterLevel() {
no need for the following line
Line 2121:         boolean isQxl = getDisplayType() == DisplayType.qxl;
Line 2122: 
Line 2123:         getBehavior().enableSinglePCI(getDefalutQxlValue());
Line 2124: 


Line 2119: 
Line 2120:     private void handleQxlClusterLevel() {
Line 2121:         boolean isQxl = getDisplayType() == DisplayType.qxl;
Line 2122: 
Line 2123:         getBehavior().enableSinglePCI(getDefalutQxlValue());
This will set it to true even on edit. You need to create a specific 
implementations of this method on new/existing behaviors (on new behaviors set 
it according to the getDefaultQxlValue() and on existing ones just ignore it).
Line 2124: 
Line 2125: 
Line 2126:         if (getSelectedCluster() != null) {
Line 2127:             boolean spiceFileTransferToggle = isQxl


http://gerrit.ovirt.org/#/c/29240/2/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/NewVmInstanceTypeManager.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/NewVmInstanceTypeManager.java:

Line 31:     @Override
Line 32:     protected void updateDefaultDisplayRelatedFields(VmBase vmBase) {
Line 33:         super.updateDefaultDisplayRelatedFields(vmBase);
Line 34:         // We are setting the Defalut Qxl support for true on new 
Linux VM with Spice display protocol
Line 35:         // This cannot be done in the template since it will effect 
REST API as well
this is true only if you do not use a specific instance type or template - e.g. 
it has to be done only:

boolean customInstanceTypeUsed = 
getModel().getInstanceTypes().getSelectedItem() instanceof CustomInstanceType;
boolean blankTemplateUsed = getModel().getTemplate().getSelectedItem() != null 
&& getModel().getTemplate().getSelectedItem().getId().equals(Guid.Empty)

if (!customInstanceTypeUsed && !blankTemplateUsed) {
maybeSetEntity...
}
Line 36:         maybeSetEntity(getModel().getIsSingleQxlEnabled(), 
getModel().getDefalutQxlValue());
Line 37:     }
Line 38: 
Line 39: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1cbb3128b8251311d3fa1c2b25ed5e90642e0e24
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shav...@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