Alona Kaplan has uploaded a new change for review.

Change subject: weadmin: Adding nic via guide me sets the wrong nic name 
(#846997)
......................................................................

weadmin: Adding nic via guide me sets the wrong nic name (#846997)

https://bugzilla.redhat.com/846997

Sometimes, when adding nic via guide me, then nic is created with the
default parameters and not with the parametrs the user specified in the
add nic dialog.
The reason - In guide me model- when adding a nic there are async queries
for nics and networks. When the nics and networks arrives fro the backend
(nic!=null && networks!=null) the adding procedure continue and opens
the dialog.
In case the networks query is done before the nics query- the adding
procedure continue (because nics were already initialized before) and
opens the dialog. Then when the nics query is done the adding procedure
resets the windowModel and tries to open a dialog (it doesn't succeed
because there is already an open one). But when the user clicks ok on the
add-nic dialog the GuideMe model uses the new window model (with default
values) set after the nic query was done.

The solution is to reset nics and networks before the quries.

Change-Id: I0445c014831967524f23ae5847b388354b0e7555
Signed-off-by: Alona Kaplan <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGuideModel.java
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/7415/1

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 5c724f9..4f71e88 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
@@ -102,6 +102,8 @@
     }
 
     private void UpdateOptionsData() {
+        nics = null;
+        disks = null;
         AsyncDataProvider.GetVmNicList(new AsyncQuery(this,
                 new INewAsyncCallback() {
                     @Override
@@ -196,6 +198,8 @@
     }
 
     private void AddNetworkUpdateData() {
+        nics = null;
+        networks = null;
         AsyncDataProvider.GetVmNicList(new AsyncQuery(this,
                 new INewAsyncCallback() {
                     @Override


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

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

Reply via email to