Timothy Asir has uploaded a new change for review.

Change subject: gluster: Fix rebalance message to display volume name along 
with confirmation
......................................................................

gluster: Fix rebalance message to display volume name along with confirmation

Change the text as "Are you sure you want to stop the rebalance operation
on the Volume:<volume-name>?"

Change-Id: Ic23df363c3627f9143971b6d9257f1e54b5593ba
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1021343
Signed-off-by: Timothy Asir <tjeya...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
2 files changed, 6 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/21140/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 7071cc0..1bf6a37 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
@@ -516,22 +516,18 @@
     }
 
     private void stopRebalance() {
-        if (getSelectedItems() == null) {
+        if (getSelectedItem() == null) {
             return;
         }
 
-        ConfirmationModel model = new ConfirmationModel();
+        final ConfirmationModel model = new ConfirmationModel();
+        final GlusterVolumeEntity volumeEntity = (GlusterVolumeEntity) 
getSelectedItem();
         setConfirmWindow(model);
         
model.setTitle(ConstantsManager.getInstance().getConstants().confirmStopVolumeRebalanceTitle());
         model.setHashName("volume_rebalance_stop"); //$NON-NLS-1$
-        
model.setMessage(ConstantsManager.getInstance().getConstants().confirmStopVolumeRebalanceMsg());
+        
model.setMessage(ConstantsManager.getInstance().getConstants().confirmStopVolumeRebalanceMsg()
+                + volumeEntity.getName() + "?"); //$NON-NLS-1$
 
-        ArrayList<String> list = new ArrayList<String>();
-        for (GlusterVolumeEntity item : Linq.<GlusterVolumeEntity> 
cast(getSelectedItems()))
-        {
-            list.add(item.getName());
-        }
-        model.setItems(list);
         UICommand okCommand = new UICommand("onStopRebalance", this); 
//$NON-NLS-1$
         okCommand.setTitle(ConstantsManager.getInstance().getConstants().ok());
         okCommand.setIsDefault(true);
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
index 92cb318..16a877c 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
@@ -1593,7 +1593,7 @@
     @DefaultStringValue("Stop Rebalance")
     String confirmStopVolumeRebalanceTitle();
 
-    @DefaultStringValue("Are you sure you want to stop the rebalance operation 
in following Volume(s)?")
+    @DefaultStringValue("Are you sure you want to stop the rebalance operation 
on the Volume:")
     String confirmStopVolumeRebalanceMsg();
 
     @DefaultStringValue("Disable Gluster Hooks")


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

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

Reply via email to