Tomas Jelinek has uploaded a new change for review. Change subject: webadmin: changed the list of fields which can not be overridden ......................................................................
webadmin: changed the list of fields which can not be overridden There are the following types of fields in instance types: - the ones which are taken from it but the user can override them (e.g. defaults) - the ones which the user can not override This patch reduces the num of fields which can not be overridden to contain only the really most important ones. This avoids the situation that the user will have to have instance types like: "big with soundcard", "big with smardcard and soundcard" etc. The list is now significantly smaller, contains only: - memory size - num of sockets/cores per socket - HA - migration model/downtime - priority - balloon/min allocated memory The specific UI changes include: - remove the chain icon from fields which are not considered to be "marked" anymore - remove the specific fields from InstanceTypeAttachDetachManager.detachableModels so it will not detach the VM from instance type if changed Change-Id: I7fc831f0a0656f8eaa92fe3509b03c8ac1b71fb9 Bug-Url: https://bugzilla.redhat.com/1149663 Signed-off-by: Tomas Jelinek <tjeli...@redhat.com> --- 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/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeAttachDetachManager.java 3 files changed, 14 insertions(+), 59 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/34/35134/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 1c358a9..3097c01 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 @@ -292,13 +292,10 @@ @WithElementId("ssoMethodGuestAgent") public EntityModelRadioButtonEditor ssoMethodGuestAgent; + @UiField(provided = true) @Path(value = "isSoundcardEnabled.entity") @WithElementId("isSoundcardEnabled") public EntityModelCheckBoxEditor isSoundcardEnabledEditor; - - @UiField(provided = true) - @Ignore - public EntityModelDetachableWidget isSoundcardEnabledEditorWithDetachable; @UiField(provided = true) @Path("copyPermissions.entity") @@ -472,26 +469,20 @@ @WithElementId("isRunAndPause") public EntityModelCheckBoxEditor isRunAndPauseEditor; + @UiField(provided = true) @Path(value = "isSmartcardEnabled.entity") @WithElementId("isSmartcardEnabled") public EntityModelCheckBoxEditor isSmartcardEnabledEditor; - - @UiField(provided = true) - public EntityModelDetachableWidget isSmartcardEnabledEditorWithDetachable; @UiField(provided = true) @Path(value = "allowConsoleReconnect.entity") @WithElementId("allowConsoleReconnect") public EntityModelCheckBoxEditor allowConsoleReconnectEditor; - + @UiField(provided = true) @Path(value = "isConsoleDeviceEnabled.entity") @WithElementId("isConsoleDeviceEnabled") public EntityModelCheckBoxEditor isConsoleDeviceEnabledEditor; - - @UiField(provided = true) - @Ignore - public EntityModelDetachableWidget isConsoleDeviceEnabledEditorWithDetachable; @UiField @Path(value = "spiceProxy.entity") @@ -526,7 +517,7 @@ @UiField(provided = true) @WithElementId - public EntityModelDetachableWidgetWithInfo<String> isRngEnabledCheckboxWithInfoIcon; + public EntityModelWidgetWithInfo<String> isRngEnabledCheckboxWithInfoIcon; @UiField @Ignore @@ -692,10 +683,6 @@ @WithElementId("watchdogModel") public ListModelListBoxEditor<VmWatchdogType> watchdogModelEditor; - @UiField - @Ignore - public DetachableLabel watchdogLabel; - @UiField(provided = true) @Path(value = "watchdogAction.selectedItem") @WithElementId("watchdogAction") @@ -744,13 +731,10 @@ @WithElementId("provisioningClone") public EntityModelRadioButtonEditor provisioningCloneEditor; + @UiField(provided = true) @Path(value = "isVirtioScsiEnabled.entity") @WithElementId("isVirtioScsiEnabled") public EntityModelCheckBoxEditor isVirtioScsiEnabled; - - @UiField(provided = true) - @Ignore - public EntityModelDetachableWidget isVirtioScsiEnabledWithDetachable; @UiField(provided = true) @Ignore @@ -957,18 +941,14 @@ private void initDetachableFields() { detachableMemSizeEditor = new EntityModelDetachableWidgetWithLabel(memSizeEditor); - isSmartcardEnabledEditorWithDetachable = new EntityModelDetachableWidget(isSmartcardEnabledEditor, Align.RIGHT); - isSoundcardEnabledEditorWithDetachable = new EntityModelDetachableWidget(isSoundcardEnabledEditor, Align.RIGHT); - isConsoleDeviceEnabledEditorWithDetachable = new EntityModelDetachableWidget(isConsoleDeviceEnabledEditor, Align.RIGHT); isHighlyAvailableEditorWithDetachable = new EntityModelDetachableWidget(isHighlyAvailableEditor, Align.RIGHT); overrideMigrationDowntimeEditorWithDetachable = new EntityModelDetachableWidget(overrideMigrationDowntimeEditor, Align.RIGHT); overrideMigrationDowntimeEditor.getContentWidgetContainer().getElement().getStyle().setWidth(20, Unit.PX); - isVirtioScsiEnabledWithDetachable = new EntityModelDetachableWidget(isVirtioScsiEnabled, Align.RIGHT); migrationModeEditorWithDetachable = new EntityModelDetachableWidget(migrationModeEditor, Align.RIGHT); StringEntityModelLabel rnglabel = new StringEntityModelLabel(); rnglabel.setText(constants.rngDevEnabled()); - isRngEnabledCheckboxWithInfoIcon = new EntityModelDetachableWidgetWithInfo<String>(rnglabel, isRngEnabledEditor); + isRngEnabledCheckboxWithInfoIcon = new EntityModelWidgetWithInfo<String>(rnglabel, isRngEnabledEditor); isRngEnabledCheckboxWithInfoIcon.setExplanation(SafeHtmlUtils.fromTrustedString(constants.rngDevExplanation())); } @@ -2051,18 +2031,12 @@ totalvCPUsEditorWithInfoIcon, numOfSocketsEditorWithDetachable, corePerSocketEditorWithDetachable, - isSmartcardEnabledEditorWithDetachable, - isConsoleDeviceEnabledEditorWithDetachable, - isSoundcardEnabledEditorWithDetachable, isHighlyAvailableEditorWithDetachable, priorityLabelWithDetachable, migrationModeEditorWithDetachable, memAllocationLabel, - isVirtioScsiEnabledWithDetachable, detachableMemSizeEditor, - overrideMigrationDowntimeEditorWithDetachable, - watchdogLabel, - isRngEnabledCheckboxWithInfoIcon + overrideMigrationDowntimeEditorWithDetachable ); } @@ -2083,13 +2057,10 @@ numOfMonitorsLabel, numOfMonitorsEditor, isSingleQxlEnabledEditor, - isSmartcardEnabledEditorWithDetachable, ssoMethodLabel, ssoMethodNone, ssoMethodGuestAgent, expander, - isSoundcardEnabledEditorWithDetachable, - isConsoleDeviceEnabledEditorWithDetachable, spiceProxyEnabledCheckboxWithInfoIcon, spiceProxyEditor, 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 e50881f..b8a6810 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 @@ -561,7 +561,7 @@ </g:HorizontalPanel> </g:FlowPanel> </g:FlowPanel> - <ge:EntityModelDetachableWidget ui:field="isSmartcardEnabledEditorWithDetachable" addStyleNames="{style.floatLeft} avmpw_smartcard_pfly_fix" /> + <ge:EntityModelCheckBoxEditor ui:field="isSmartcardEnabledEditor" addStyleNames="{style.floatLeft} avmpw_smartcard_pfly_fix" /> <g:Label ui:field="nativeUsbWarningMessage" text="{constants.nativeUsbSupportWarning}" addStyleNames="{style.warningMessageLabel}" /> <g:Label ui:field="ssoMethodLabel" text="{constants.ssoMethod}" addStyleNames="{style.sectionLabel} {style.floatLeft} {style.fullWidth}" /> @@ -575,8 +575,8 @@ <ge:EntityModelCheckBoxEditor ui:field="allowConsoleReconnectEditor" addStyleNames="{style.checkboxWithLongLabel}" /> </g:FlowPanel> - <ge:EntityModelDetachableWidget ui:field="isSoundcardEnabledEditorWithDetachable" addStyleNames="{style.checkboxWithLongLabel}" /> - <ge:EntityModelDetachableWidget ui:field="isConsoleDeviceEnabledEditorWithDetachable" addStyleNames="{style.checkboxWithLongLabel}" /> + <ge:EntityModelCheckBoxEditor ui:field="isSoundcardEnabledEditor" addStyleNames="{style.checkboxWithLongLabel}" /> + <ge:EntityModelCheckBoxEditor ui:field="isConsoleDeviceEnabledEditor" addStyleNames="{style.checkboxWithLongLabel}" /> <w:EntityModelWidgetWithInfo ui:field="spiceProxyEnabledCheckboxWithInfoIcon" /> <ge:StringEntityModelTextBoxEditor ui:field="spiceProxyEditor" /> @@ -642,11 +642,7 @@ </g:FlowPanel> <g:FlowPanel addStyleNames="{style.sectionPanel}, {style.floatLeft}" ui:field="watchdogPanel"> - <ge:DetachableLabel ui:field="watchdogLabel" contentWidgetStyleName="{style.sectionLabel}"> - <ge:decorated> - <g:Label text="{constants.watchdog}" /> - </ge:decorated> - </ge:DetachableLabel> + <g:Label text="{constants.watchdog}" addStyleNames="{style.sectionLabel}"/> <e:ListModelListBoxEditor ui:field="watchdogModelEditor" /> <e:ListModelListBoxEditor ui:field="watchdogActionEditor" /> </g:FlowPanel> @@ -706,7 +702,7 @@ <g:Label addStyleNames="{style.sectionLabel}" text="{constants.disksAllocation}" /> </g:HorizontalPanel> <g:HorizontalPanel addStyleNames="{style.floatLeft}"> - <ge:EntityModelDetachableWidget ui:field="isVirtioScsiEnabledWithDetachable" addStyleNames="{style.checkbox}" /> + <ge:EntityModelCheckBoxEditor ui:field="isVirtioScsiEnabled" addStyleNames="{style.checkbox}" /> <d:InfoIcon ui:field="isVirtioScsiEnabledInfoIcon" addStyleNames="{style.infoIcon}" visible="false"/> </g:HorizontalPanel> <g:FlowPanel ui:field="disksPanel"> @@ -748,7 +744,7 @@ <t:DialogTab ui:field="rngDeviceTab"> <t:content> <g:FlowPanel addStyleNames="{style.sectionPanel}"> - <w:EntityModelDetachableWidgetWithInfo ui:field="isRngEnabledCheckboxWithInfoIcon" addStyleNames="{style.checkbox}" /> + <w:EntityModelWidgetWithInfo ui:field="isRngEnabledCheckboxWithInfoIcon" addStyleNames="{style.checkbox}" /> <g:FlowPanel ui:field="rngPanel"> <ge:IntegerEntityModelTextBoxEditor ui:field="rngPeriodEditor"/> <ge:IntegerEntityModelTextBoxEditor ui:field="rngBytesEditor" /> diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeAttachDetachManager.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeAttachDetachManager.java index 8e2694a..8a72465 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeAttachDetachManager.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeAttachDetachManager.java @@ -143,30 +143,18 @@ */ private void initDetachableFields() { detachableModels = Arrays.asList( - new Model[]{ + new Model[] { model.getMemSize(), model.getTotalCPUCores(), model.getNumOfSockets(), model.getCoresPerSocket(), - model.getIsSmartcardEnabled(), - model.getIsSoundcardEnabled(), - model.getIsConsoleDeviceEnabled(), model.getIsHighlyAvailable(), model.getMigrationMode(), model.getOverrideMigrationDowntime(), model.getMigrationDowntime(), - model.getIsHighlyAvailable(), model.getPriority(), - model.getWatchdogModel(), - model.getWatchdogAction(), model.getMinAllocatedMemory(), model.getMemoryBalloonDeviceEnabled(), - model.getIsVirtioScsiEnabled(), - model.getIsRngEnabled(), - model.getRngBytes(), - model.getRngPeriod(), - model.getRngSourceRandom(), - model.getRngSourceHwrng() } ); -- To view, visit http://gerrit.ovirt.org/35134 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fc831f0a0656f8eaa92fe3509b03c8ac1b71fb9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches