anmolbabu has uploaded a new change for review.

Change subject: webadmin : Fix Snapshots sub tab DeleteAll availability
......................................................................

webadmin : Fix Snapshots sub tab DeleteAll availability

Delete All Button under Snapshots sub tab is enabled
by default.
This patch makes Delete All button not enabled when there
are no snapshots present in the cluster.

Change-Id: Ibdf8ccf8b09b89c2da71aff8b170c60d35e5877b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1201683
Signed-off-by: Anmol Babu <anb...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/40413/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
index ccad0e1..c54afae 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
@@ -146,7 +146,7 @@
     private void updateActionAvailability() {
         boolean allowRestore = false;
         boolean allowDelete = true;
-        boolean allowDeleteAll = true;
+        boolean allowDeleteAll = getItems() == null ? false : 
getItems().size() > 0;
         boolean allowActivate = false;
         boolean allowDeactivate = false;
         boolean allowCreateSnapshot = true;


-- 
To view, visit https://gerrit.ovirt.org/40413
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdf8ccf8b09b89c2da71aff8b170c60d35e5877b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
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