anmolbabu has uploaded a new change for review.

Change subject: webadmin : Clicking on the 'x' button should close the status 
dialog.
......................................................................

webadmin : Clicking on the 'x' button should close the status dialog.

Fixed Clicking on the 'x' button does not close the status dialog.

Now,Clicking on the 'x' button closes the status dialog.

Change-Id: Ic0363784b13b26603f1f6279423adcac5e592045
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1012329
Signed-off-by: Anmol Babu <anb...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
1 file changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/10/19910/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
index 8acfa95..b09e69e 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
@@ -446,7 +446,7 @@
         else if (command.equals(getRemoveVolumeCommand())) {
             removeVolume();
         } else if(command.getName().equals("rebalanceNotStarted")) 
{//$NON-NLS-1$
-            setConfirmWindow(null);
+            closeConfirmationWindow();
         }
         else if (command.getName().equals("Cancel")) { //$NON-NLS-1$
             cancel();
@@ -473,6 +473,11 @@
         } else if (command.getName().equals("OnRemove")) { //$NON-NLS-1$
             onRemoveVolume();
         }
+    }
+
+    private void closeConfirmationWindow() {
+        getConfirmWindow().stopProgress();
+        setConfirmWindow(null);
     }
 
     private void startRebalance() {
@@ -564,20 +569,22 @@
         setConfirmWindow(cModel);
         
cModel.setTitle(ConstantsManager.getInstance().getConstants().rebalanceStatusTitle());
         
cModel.startProgress(ConstantsManager.getInstance().getConstants().rebalanceStatusFetchMessage());//$NON-NLS-1$
+
         final UICommand rebalanceStatusOk = new 
UICommand("rebalanceNotStarted", VolumeListModel.this);//$NON-NLS-1$
         
rebalanceStatusOk.setTitle(ConstantsManager.getInstance().getConstants().ok());
         rebalanceStatusOk.setIsCancel(true);
+        cModel.getCommands().add(rebalanceStatusOk);
+
         AsyncDataProvider.getGlusterRebalanceStatus(new AsyncQuery(this, new 
INewAsyncCallback() {
             @Override
             public void onSuccess(Object model, Object returnValue) {
                 GlusterVolumeTaskStatusEntity rebalanceStatusEntity =
                         (GlusterVolumeTaskStatusEntity) returnValue;
-                cModel.stopProgress();
                 if ((rebalanceStatusEntity == null) || 
(rebalanceStatusEntity.getStatusSummary().getStatus() == 
JobExecutionStatus.UNKNOWN)) {
+                    cModel.stopProgress();
                     
cModel.setMessage(ConstantsManager.getInstance().getMessages().rebalanceStatusConfirmationMessage(volumeEntity.getName()));
-                    cModel.getCommands().add(rebalanceStatusOk);
                 } else {
-                    setConfirmWindow(null);
+                    closeConfirmationWindow();
                     VolumeRebalanceStatusModel rebalanceStatusModel =
                             new VolumeRebalanceStatusModel(volumeEntity);
                     
rebalanceStatusModel.setTitle(ConstantsManager.getInstance()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0363784b13b26603f1f6279423adcac5e592045
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to