Change in ovirt-engine[master]: userportal, webadmin: redesign vCPU editing (#809800)

tjelinek at redhat.com tjelinek at redhat.com
Wed Aug 15 12:54:51 UTC 2012


Tomas Jelinek has submitted this change and it was merged.

Change subject: userportal,webadmin: redesign vCPU editing (#809800)
......................................................................


userportal,webadmin: redesign vCPU editing (#809800)

https://bugzilla.redhat.com/809800

The new design is now the following:
- there is an editable text field without a slider with label
  "Total Virtual CPUs"
- just under it an "advanced options" expandable component with two
  combo boxes:
  - Virtual Sockets
  - Cores per Virtual Socket

The behaviour is as follows:
- When the "Num of vCPUs" changes to new correct value, than:
  1 when some value is already selected in the
    "Cores per Virtual Socket", it tries to set the value of the
    "Virtual Sockets" to compose the new "Total Virtual CPUs" but
    preserving the "Cores per Virtual Socket" (e.g. "Cores per Virtual
    Socket" is 2 and "Total Virtual CPUs" changed to 12, the "Virtual
    Sockets" will be changed to 6).
  2 If the "Cores per Virtual Socket" is not set or can not be used to
    compose the new "Total Virtual CPUs", than the "Cores per Virtual
    Socket" and "Virtual Sockets" are automatically adjusted to the new
    values, while the "Virtual Sockets" tries to be the biggest possible
    (but not bigger, than the predefined value from vdc_options). For
    example, both the max enabled "Virtual Sockets" and "Cores per
    Virtual Socket" is 16 and the "Total Virtual CPUs" changes to 18,
    than the "Num of Virtual Sockets" will be 9 and the "Cores per
    Virtual Socket" will be 2.
  3 The combo boxes will be filled only by values, which
    can be used to compose the selected "Total Virtual CPUs" (e.g. the
    "Total Virtual CPUs" is the boundary for the advanced options.

- When the "Total Virtual CPUs" changes to new incorrect value, than the
  "Cores per Socket" and "Num of Sockets" gets disabled
- On submit there are three validations:
  1 Not Empty validation
  2 Integer validation which checks both if the value is an integer and
    also if it is between <1, max num of vcpus from vdc_options>
  3 Custom validation, which checks, if the specified
    "Total Virtual CPUs" is composable from the "Virtual Sockets" and
    "Cores per Virtual Socket" (e.g. there exists at least one
    combination of the available "Virtual Sockets" and "Cores per
    Virtual Socket" which makes up this number of "Total Virtual CPUs".
    If this is not fulfilled, than the following message is shown:
    "Incorrect number of Total Virtual CPUs. It is not possible to
    compose this number from the available Virtual Sockets and Cores
    per Virtual Sockets"
- When one of the combo boxes changes, the second one is
  automatically adjusted to the value to compose the selected
  "Total Virtual CPUs" amount.
- The combo boxes never contains values, which can not compose
  the defined "Total Virtual CPUs" amount.

Change-Id: I75cc943dfa986546878b3ae5faae3cfb637fb188
Signed-off-by: Tomas Jelinek <tjelinek at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/AbstractVmPopupView.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/dialog/AdvancedParametersExpander.ui.xml
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/EntityModelInputWithSlider.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/EntityModelSliderWithTextBoxEditor.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml
D frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/RangeEntityModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingVmModelBehavior.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewTemplateVmModelBehavior.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewVmModelBehavior.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/TemplateVmModelBehavior.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java
21 files changed, 495 insertions(+), 258 deletions(-)

Approvals:
  Tomas Jelinek: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75cc943dfa986546878b3ae5faae3cfb637fb188
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>



More information about the Engine-commits mailing list