Kanagaraj M has uploaded a new change for review.

Change subject: webadmin: disable rebalance action when its being started
......................................................................

webadmin: disable rebalance action when its being started

Once the user clicks on 'Rebalance' action in volumes tab,
glusterfs takes few seconds to start the rebalance operation.
'Rebalance' action will be disabled immediately without
waiting for the result from glusterfs.

Change-Id: I961955f15310e5d0566019556e7f7e601e8ec957
Bug-Url: https://bugzilla.redhat.com/1021814
Signed-off-by: Kanagaraj M <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/22224/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 d3056ac..c4a941f 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
@@ -404,7 +404,10 @@
 
                 GlusterAsyncTask asyncTask = volume.getAsyncTask();
                 if (asyncTask != null) {
-                    allowStartRebalance = allowStartRebalance && 
asyncTask.getStatus() != JobExecutionStatus.STARTED;
+                    allowStartRebalance =
+                            allowStartRebalance &&
+                                    asyncTask.getStatus() == null ? 
asyncTask.getJobStatus() != JobExecutionStatus.STARTED
+                                    : asyncTask.getStatus() != 
JobExecutionStatus.STARTED;
                 }
             }
 


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

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

Reply via email to