Shahar Havivi has uploaded a new change for review. Change subject: UI: set the default initial run to false in RunOnce dialog ......................................................................
UI: set the default initial run to false in RunOnce dialog We change the default to false only if the is_initialized flag is true (ie the user already run/initialize the VM), Assuming that the user don't want to re-initialize the VM again. Change-Id: I2ac2eeee70d1fb4db2712b5407ee3e778e7293c1 Bug-Url: https://bugzilla.redhat.com/1051041 Signed-off-by: Shahar Havivi <[email protected]> --- 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/widget/uicommon/popup/vm/VmRunOncePopupWidget.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RunOnceModel.java 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/05/24505/1 diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java index 748bcc3..20005da 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java @@ -155,7 +155,7 @@ String runOncePopupBootSequenceLabel(); @DefaultStringValue("Use Cloud-Init") - String runOncePopupCloudInitLabe(); + String runOncePopupCloudInitLabel(); @DefaultStringValue("VM Hostname") String cloudInitHostnameLabel(); diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmRunOncePopupWidget.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmRunOncePopupWidget.java index 9a44cf6..77bd75a 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmRunOncePopupWidget.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/vm/VmRunOncePopupWidget.java @@ -292,7 +292,7 @@ kernelParamsEditor.setLabel(constants.runOncePopupKernelParamsLabel()); // Cloud Init - cloudInitEnabledEditor.setLabel(constants.runOncePopupCloudInitLabe()); + cloudInitEnabledEditor.setLabel(constants.runOncePopupCloudInitLabel()); // WindowsSysprep sysprepToEnableLabel.setText(constants.runOnceSysPrepToEnableLabel()); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RunOnceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RunOnceModel.java index 630f09c..b9d9085 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RunOnceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/RunOnceModel.java @@ -651,7 +651,7 @@ setIsWindowsOS(AsyncDataProvider.isWindowsOsType(vm.getVmOsId())); getIsVmFirstRun().setEntity(!vm.isInitialized()); - initVmInitEnabled(vm.getVmInit()); + initVmInitEnabled(vm.getVmInit(), vm.isInitialized()); getVmInit().init(vm.getStaticData()); setCustomPropertiesKeysList(customPropertiesKeysList); @@ -678,12 +678,12 @@ vncProtocol : qxlProtocol); } - private void initVmInitEnabled(VmInit vmInit) { + private void initVmInitEnabled(VmInit vmInit, boolean isInitialized) { if (vmInit == null) { getIsCloudInitEnabled().setEntity(false); getIsSysprepEnabled().setEntity(false); getAttachFloppy().setEntity(false); - } else { + } else if (!isInitialized) { if (getIsWindowsOS()) { getIsSysprepEnabled().setEntity(true); getAttachFloppy().setEntity(true); -- To view, visit http://gerrit.ovirt.org/24505 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ac2eeee70d1fb4db2712b5407ee3e778e7293c1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Shahar Havivi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
