Ramesh N has uploaded a new change for review.

Change subject: webadmin: Fix for NPE in remove brick status dialog
......................................................................

webadmin: Fix for NPE in remove brick status dialog

  Fixing the NPE in rebalance status dialog due to which
stop, commit, retain actions are disabled in remove brick
status.

Change-Id: Ibfe886c240a6d55798a1ad021c58dc874b8cff12
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1022511
Signed-off-by: Ramesh Nachimuthu <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeRebalanceStatusModel.java
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/89/20689/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeRebalanceStatusModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeRebalanceStatusModel.java
index 013c297..daa5cfe 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeRebalanceStatusModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeRebalanceStatusModel.java
@@ -3,6 +3,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.ovirt.engine.core.common.asynctasks.gluster.GlusterTaskType;
 import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity;
 import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusEntity;
 import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost;
@@ -119,11 +120,13 @@
                 refresh.cancel();
             }
         }
-        
getStopReblanceFromStatus().setIsExecutionAllowed(rebalanceStatusEntity.getStatusSummary().getStatus()
 == JobExecutionStatus.STARTED);
+        if 
(GlusterTaskType.REBALANCE.equals(getEntity().getAsyncTask().getType())) {
+            
getStopReblanceFromStatus().setIsExecutionAllowed(rebalanceStatusEntity.getStatusSummary().getStatus()
 == JobExecutionStatus.STARTED);
+        }
     }
 
     public void cancelRefresh() {
-        if(refresh != null) {
+        if (refresh != null) {
             refresh.cancel();
         }
     }
@@ -138,6 +141,7 @@
             }
         }), volumeEntity.getClusterId(), volumeEntity.getId());
     }
+
     public GlusterVolumeEntity getEntity() {
         return entity;
     }
@@ -160,7 +164,7 @@
 
     public void setStatusAvailable(boolean isStatusAvailable) {
         this.isStatusAvailable = isStatusAvailable;
-        if(isStatusAvailable == true) {
+        if (isStatusAvailable == true) {
             onPropertyChanged(new 
PropertyChangedEventArgs("IS_STATUS_APPLICABLE"));//$NON-NLS-1$
         }
     }


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

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

Reply via email to