Tomas Jelinek has posted comments on this change.
Change subject: UI: support multi monitor only for cluster 3.3 and up
......................................................................
Patch Set 5:
(3 comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
Line 165: // ==Console Tab==
Line 166: getDisplayProtocol().setIsChangable(false);
Line 167: getUsbPolicy().setIsChangable(false);
Line 168: getNumOfMonitors().setIsChangable(false);
Line 169: getBehavior().enableSinglePCI(false);
here just the availability should be changed - otherwise if you open the VM
attached to pool it will automatically disable this property if you edit
something unrelated (e.g. name).
BTW I would say not the availability but changeability (setIsChangable) like
all the other widgets should be set.
Line 170: getIsSmartcardEnabled().setIsChangable(false);
Line 171: getAllowConsoleReconnect().setIsChangable(false);
Line 172: getVncKeyboardLayout().setIsChangable(false);
Line 173:
Line 1711:
Line 1712: getVncKeyboardLayout().setIsAvailable(isVncSelected());
Line 1713: }
Line 1714:
Line 1715: private void dataCenterWithClusterSelectedItemChanged(Object
sender, EventArgs args)
since it depends also on cluster level you need to handle it also here the same
way as you have handled it in oSType_SelectedItemChanged.
Line 1716: {
Line 1717: behavior.dataCenterWithClusterSelectedItemChanged();
Line 1718:
Line 1719: DataCenterWithCluster dataCenterWithCluster =
Line 1815:
getUsbPolicy().setSelectedItem(org.ovirt.engine.core.common.businessentities.UsbPolicy.DISABLED);
Line 1816: getIsSmartcardEnabled().setEntity(false);
Line 1817: }
Line 1818:
Line 1819: getBehavior().enableSinglePCI(type == DisplayType.qxl);
consider the following flow:
- user selects a cluster on which the enableSinglePCI is disabled.
- than the user selects the QXL driver which causes this
"displayProtocol_SelectedItemChanged" to be called
- result: the enableSinglePCI will be enabled even the cluster does not support
it
What you need to do is to have some method like "updateSinglePciEnabled()"
which will be called from the following places:
- displayProtocol_SelectedItemChanged
- dataCenterWithClusterSelectedItemChanged
- oSType_SelectedItemChanged
And inside this method handle all the conditions.
Line 1820:
Line 1821: getUsbPolicy().setIsChangable(type == DisplayType.qxl);
Line 1822: getIsSmartcardEnabled().setIsChangable(type ==
DisplayType.qxl);
Line 1823:
--
To view, visit http://gerrit.ovirt.org/19468
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f65dd3d5ca1409402b9b0b93e1585f4bfa47a64
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches