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 <[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/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/instancetypes/InstanceTypeAttachDetachManager.java 3 files changed, 13 insertions(+), 57 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/34916/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..849f189 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 @@ -298,13 +298,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") @@ -478,26 +475,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") @@ -532,7 +523,7 @@ @UiField(provided = true) @WithElementId - public EntityModelDetachableWidgetWithInfo<String> isRngEnabledCheckboxWithInfoIcon; + public EntityModelWidgetWithInfo<String> isRngEnabledCheckboxWithInfoIcon; @UiField @Ignore @@ -698,10 +689,6 @@ @WithElementId("watchdogModel") public ListModelListBoxEditor<VmWatchdogType> watchdogModelEditor; - @UiField - @Ignore - public DetachableLabel watchdogLabel; - @UiField(provided = true) @Path(value = "watchdogAction.selectedItem") @WithElementId("watchdogAction") @@ -750,13 +737,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 @@ -979,18 +963,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())); } @@ -1999,17 +1979,12 @@ totalvCPUsEditorWithInfoIcon, numOfSocketsEditorWithDetachable, corePerSocketEditorWithDetachable, - isSmartcardEnabledEditorWithDetachable, - isConsoleDeviceEnabledEditorWithDetachable, - isSoundcardEnabledEditorWithDetachable, isHighlyAvailableEditorWithDetachable, priorityLabelWithDetachable, migrationModeEditorWithDetachable, memAllocationLabel, - isVirtioScsiEnabledWithDetachable, detachableMemSizeEditor, overrideMigrationDowntimeEditorWithDetachable, - watchdogLabel, isRngEnabledCheckboxWithInfoIcon ); } @@ -2031,13 +2006,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 cea7939..3c74135 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" /> @@ -643,11 +643,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> @@ -707,7 +703,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"> @@ -749,7 +745,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 baa46e3..b7f885b 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/34916 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7fc831f0a0656f8eaa92fe3509b03c8ac1b71fb9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
