Gilad Chaplik has uploaded a new change for review.

Change subject: frontend: show cpu profile field for edit template
......................................................................

frontend: show cpu profile field for edit template

Change-Id: I26046b23f4931a7c40a1bc53d3d95a8518531e94
Signed-off-by: Gilad Chaplik <[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
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/template/TemplateNewPopupWidget.java
3 files changed, 27 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/04/33904/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 178b495..4aace95 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
@@ -712,6 +712,15 @@
     protected DialogTab resourceAllocationTab;
 
     @UiField
+    protected FlowPanel cpuSharesPanel;
+
+    @UiField
+    protected FlowPanel cpuPinningPanel;
+
+    @UiField
+    protected FlowPanel memAllocationPanel;
+
+    @UiField
     protected FlowPanel storageAllocationPanel;
 
     @UiField
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 cea7939..899a664 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
@@ -663,14 +663,14 @@
                             <g:Label text="{constants.cpuAllocVmPopup}" 
addStyleNames="{style.sectionLabel}" />
                             <g:FlowPanel addStyleNames="{style.labelToCouple}">
                                 <e:ListModelListBoxEditor 
ui:field="cpuProfilesEditor" />
-                                <g:Label ui:field="cpuSharesEditor" 
text="{constants.cpuShares}" addStyleNames="{style.labelToCoupleLabel}"/>
-                                <g:FlowPanel 
addStyleNames="{style.labelToCoupleCouple}">
+                                <g:FlowPanel ui:field="cpuSharesPanel" 
addStyleNames="{style.labelToCoupleCouple}">
+                                       <g:Label ui:field="cpuSharesEditor" 
text="{constants.cpuShares}" addStyleNames="{style.labelToCoupleLabel}"/>
                                     <e:ListModelListBoxOnlyEditor 
ui:field="cpuSharesAmountSelectionEditor" 
addStyleNames="{style.labelToCoupleCoupleLeft}" 
contentWidgetStyleName="{style.cpuSahresValueListBox}" />
                                     <ge:IntegerEntityModelTextBoxOnlyEditor 
ui:field="cpuSharesAmountEditor" 
addStyleNames="{style.labelToCoupleCoupleRight}" 
contentWidgetStyleName="{style.cpuSahresValueTextBox} 
avmpw_cpuSahresValueTextBox_pfly_fix" />
                                 </g:FlowPanel>
                             </g:FlowPanel>
 
-                            <g:FlowPanel addStyleNames="{style.labelToCouple}">
+                            <g:FlowPanel ui:field="cpuPinningPanel" 
addStyleNames="{style.labelToCouple}">
                                 <g:Label text="{constants.cpuPinningLabel}" 
addStyleNames="{style.labelToCoupleLabel}"/>
                                 <g:FlowPanel 
addStyleNames="{style.labelToCoupleCouple}">
                                     <d:InfoIcon ui:field="cpuPinningInfo" 
addStyleNames="{style.labelToCoupleCoupleLeft} avmpw_infoIcon_pfly_fix"/>
@@ -679,7 +679,7 @@
                             </g:FlowPanel>
 
                         </g:FlowPanel>
-                        <g:FlowPanel addStyleNames="{style.sectionPanelTight}">
+                        <g:FlowPanel ui:field="memAllocationPanel" 
addStyleNames="{style.sectionPanelTight}">
                             <ge:DetachableLabel ui:field="memAllocationLabel" 
contentWidgetStyleName="{style.sectionLabel}">
                                 <ge:decorated>
                                     <g:Label 
text="{constants.memAllocVmPopup}" />
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/template/TemplateNewPopupWidget.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/template/TemplateNewPopupWidget.java
index 897dc42..c5754c3 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/template/TemplateNewPopupWidget.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/template/TemplateNewPopupWidget.java
@@ -2,7 +2,9 @@
 
 import static 
org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField;
 
-import com.google.gwt.event.shared.EventBus;
+import java.util.Arrays;
+import java.util.List;
+
 import org.ovirt.engine.ui.common.CommonApplicationConstants;
 import org.ovirt.engine.ui.common.CommonApplicationMessages;
 import org.ovirt.engine.ui.common.CommonApplicationResources;
@@ -12,6 +14,8 @@
 import 
org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.ui.Widget;
 
 public class TemplateNewPopupWidget extends AbstractVmPopupWidget {
 
@@ -39,7 +43,15 @@
                 putAll(poolSpecificFields(), hiddenField()).
                 putOne(templateEditor, hiddenField()).
                 putOne(instanceTypesEditor, hiddenField()).
-                update(resourceAllocationTab, hiddenField());
+                putAll(resourceAllocationTemplateHiddenFields(), 
hiddenField());
     }
 
+    protected List<Widget> resourceAllocationTemplateHiddenFields() {
+        return Arrays.<Widget> asList(
+                cpuSharesPanel,
+                cpuPinningPanel,
+                memAllocationPanel,
+                storageAllocationPanel,
+                disksAllocationPanel);
+    }
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26046b23f4931a7c40a1bc53d3d95a8518531e94
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to