Tomas Jelinek has uploaded a new change for review. Change subject: webadmin: new VM guide dialog does not get updated ......................................................................
webadmin: new VM guide dialog does not get updated The "There are still unconfigured entities" is present after adding a new disk. The problem was that the postAction and resetData were not called from the NewDiskModel. This works for the network interfaces because NewGuideVmInterfaceModel always calls this methods correctly. Fixed by creating the NewGuideDiskModel which works the same way as the network one. Change-Id: I7f6c38cdc316b8f9b3501e04980d7cb2e3908136 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1005846 Signed-off-by: Tomas Jelinek <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java A frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewGuideDiskModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGuideModel.java 3 files changed, 27 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/19040/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java index 65f504f..4438961 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java @@ -191,10 +191,15 @@ NewDiskModel diskModel = (NewDiskModel) result.getState(); diskModel.stopProgress(); diskModel.cancel(); + postSave(); } }, this); } + protected void postSave() { + // empty by default + } + @Override public boolean validate() { super.validate(); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewGuideDiskModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewGuideDiskModel.java new file mode 100644 index 0000000..affb3a3 --- /dev/null +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewGuideDiskModel.java @@ -0,0 +1,21 @@ +package org.ovirt.engine.ui.uicommonweb.models.vms; + +public class NewGuideDiskModel extends NewDiskModel { + + private VmGuideModel sourceModel; + + public NewGuideDiskModel(VmGuideModel sourceModel) { + this.sourceModel = sourceModel; + } + + @Override + protected void postSave() { + super.postSave(); + sourceModel.postAction(); + } + + protected void cancel() { + super.cancel(); + sourceModel.resetData(); + } +} diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGuideModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGuideModel.java index 25b8ccb..6b30266 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGuideModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGuideModel.java @@ -172,7 +172,7 @@ return; } - NewDiskModel model = new NewDiskModel(); + NewDiskModel model = new NewGuideDiskModel(this); model.setTitle(ConstantsManager.getInstance().getConstants().addVirtualDiskTitle()); model.setHashName("new_virtual_disk"); //$NON-NLS-1$ model.setVm(getEntity()); -- To view, visit http://gerrit.ovirt.org/19040 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f6c38cdc316b8f9b3501e04980d7cb2e3908136 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
