Tomas Jelinek has uploaded a new change for review. Change subject: webadmin: fixed layout of total VCPUs editor ......................................................................
webadmin: fixed layout of total VCPUs editor The broken layout was caused by using custom styling of the widget with info icon. Fixed by using the standard EntityModelWidgetWithInfo widget. Change-Id: Iadb78a9bba4c98d5189463a19471e248c2e3f902 Signed-off-by: Tomas Jelinek <[email protected]> --- 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 2 files changed, 20 insertions(+), 21 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/33/28433/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java index 9edc0a9..c80fdf7 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.java @@ -223,13 +223,13 @@ @WithElementId("memSize") public EntityModelTextBoxEditor<Integer> memSizeEditor; - @UiField(provided = true) @Path(value = "totalCPUCores.entity") @WithElementId("totalCPUCores") public StringEntityModelTextBoxOnlyEditor totalvCPUsEditor; @UiField(provided = true) - InfoIcon totalVCpuInfoIcon; + @Ignore + public EntityModelWidgetWithInfo totalvCPUsEditorWithInfoIcon; @UiField @Ignore @@ -731,6 +731,7 @@ initPoolSpecificWidgets(resources, messages); initTextBoxEditors(); initSpiceProxy(); + initTotalVcpus(); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); @@ -763,6 +764,14 @@ spiceProxyEnabledCheckboxWithInfoIcon = new EntityModelWidgetWithInfo(label, spiceProxyOverrideEnabledEditor); } + private void initTotalVcpus() { + EntityModelLabel label = new EntityModelLabel(); + label.setText(constants.numOfVCPUs()); + totalvCPUsEditor = new StringEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer()); + totalvCPUsEditorWithInfoIcon = new EntityModelWidgetWithInfo(label, totalvCPUsEditor); + totalvCPUsEditorWithInfoIcon.setExplanation(applicationTemplates.italicText(messages.hotPlugUnplugCpuWarning())); + } + public void setSpiceProxyOverrideExplanation(String explanation) { spiceProxyEnabledCheckboxWithInfoIcon.setExplanation(applicationTemplates.italicText(explanation)); } @@ -771,7 +780,6 @@ templateVersionNameEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer()); descriptionEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer()); commentEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer()); - totalvCPUsEditor = new StringEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer()); numOfVmsEditor = new IntegerEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer()); cpuPinning = new StringEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer()); cpuSharesAmountEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer()); @@ -816,7 +824,6 @@ }); - totalVCpuInfoIcon = new InfoIcon(applicationTemplates.italicText(messages.hotPlugUnplugCpuWarning()), resources); } /** diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml index afbb2fb..84d0efb 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml @@ -337,10 +337,6 @@ padding-left: 5px; } - .totalvcpusTextBox { - float: right; - } - .cpuSahresValueTextBox { padding-left: 5px; } @@ -446,20 +442,16 @@ <t:content> <g:FlowPanel> <ge:EntityModelTextBoxEditor ui:field="memSizeEditor"/> - <g:FlowPanel addStyleNames="{style.labelToCouple}"> - <g:Label text="{constants.numOfVCPUs}" addStyleNames="{style.labelToCoupleLabel}"/> - <d:InfoIcon ui:field="totalVCpuInfoIcon"/> - <ge:StringEntityModelTextBoxOnlyEditor ui:field="totalvCPUsEditor" addStyleNames="{style.totalvcpusTextBox}"/> - </g:FlowPanel> - <g:FlowPanel addStyleNames="{style.sectionPanel}"> - <d:AdvancedParametersExpander ui:field="vcpusAdvancedParameterExpander"/> - <g:FlowPanel ui:field="vcpusAdvancedParameterExpanderContent" addStyleNames="{style.generalExpanderContent}"> - <e:ListModelListBoxEditor ui:field="corePerSocketEditor" /> - <e:ListModelListBoxEditor ui:field="numOfSocketsEditor" /> - </g:FlowPanel> + <w:EntityModelWidgetWithInfo ui:field="totalvCPUsEditorWithInfoIcon" /> + <g:FlowPanel addStyleNames="{style.sectionPanel}"> + <d:AdvancedParametersExpander ui:field="vcpusAdvancedParameterExpander"/> + <g:FlowPanel ui:field="vcpusAdvancedParameterExpanderContent" addStyleNames="{style.generalExpanderContent}"> + <e:ListModelListBoxEditor ui:field="corePerSocketEditor" /> + <e:ListModelListBoxEditor ui:field="numOfSocketsEditor" /> </g:FlowPanel> - <g:Label addStyleNames="{style.sectionLabel}" text="{constants.initialRunGeneral}" /> - <e:ListModelListBoxEditor ui:field="timeZoneEditor" /> + </g:FlowPanel> + <g:Label addStyleNames="{style.sectionLabel}" text="{constants.initialRunGeneral}" /> + <e:ListModelListBoxEditor ui:field="timeZoneEditor" /> </g:FlowPanel> </t:content> </t:DialogTab> -- To view, visit http://gerrit.ovirt.org/28433 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadb78a9bba4c98d5189463a19471e248c2e3f902 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Tomas Jelinek <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
