Karnan t c has uploaded a new change for review.

Change subject: webadmin: changed confirmation message restore snapshot popup
......................................................................

webadmin: changed confirmation message restore snapshot popup

changed the confirmation message to warn the user that the volume
will be brought down to restore snapshot when volume is online
and snaphot is deactivated.

Change-Id: I34d27eed4d24c039bbe74c0b165e6a6dce9baa95
Bug-Url: https://bugzilla.redhat.com/1203454
Signed-off-by: Karnan TC <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java
1 file changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/66/39566/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 aaa49a2..19cb18e 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
@@ -245,7 +245,7 @@
         }
 
         ConfirmationModel model = new ConfirmationModel();
-        GlusterVolumeSnapshotEntity snapshot = (GlusterVolumeSnapshotEntity) 
getSelectedItem();
+        GlusterVolumeSnapshotEntity snapshot = getSelectedItem();
         setConfirmWindow(model);
         
model.setTitle(ConstantsManager.getInstance().getMessages().confirmRestoreSnapshot(getEntity().getName()));
         model.setHelpTag(HelpTag.volume_restore_snapshot_confirmation);
@@ -255,7 +255,7 @@
                     .getConstants()
                     .confirmVolumeSnapshotRestoreWithStopMessage());
         } else {
-            
model.setMessage(ConstantsManager.getInstance().getConstants().confirmVolumeSnapshotRestoreMesage());
+            
model.setMessage(ConstantsManager.getInstance().getConstants().confirmVolumeSnapshotRestoreWithStopMessage());
         }
 
         UICommand okCommand = 
UICommand.createDefaultOkUiCommand("onRestoreSnapshot", this); //$NON-NLS-1$
@@ -267,7 +267,7 @@
     private void onRestoreSnapshot() {
         runAction(VdcActionType.RestoreGlusterVolumeSnapshot,
                 new GlusterVolumeSnapshotActionParameters(getEntity().getId(),
-                        ((GlusterVolumeSnapshotEntity) 
getSelectedItem()).getSnapshotName(),
+                        getSelectedItem().getSnapshotName(),
                         true));
     }
 
@@ -277,7 +277,7 @@
         }
 
         ConfirmationModel model = new ConfirmationModel();
-        List<GlusterVolumeSnapshotEntity> snapshots = 
(List<GlusterVolumeSnapshotEntity>) getSelectedItems();
+        List<GlusterVolumeSnapshotEntity> snapshots = getSelectedItems();
         StringBuilder snapshotNames = new StringBuilder();
         for (GlusterVolumeSnapshotEntity snapshot : snapshots) {
             snapshotNames.append(snapshot.getSnapshotName());
@@ -306,7 +306,7 @@
         ConfirmationModel model = (ConfirmationModel) getConfirmWindow();
 
         List<VdcActionParametersBase> paramsList = new ArrayList<>();
-        for (GlusterVolumeSnapshotEntity snapshot : 
(List<GlusterVolumeSnapshotEntity>) getSelectedItems()) {
+        for (GlusterVolumeSnapshotEntity snapshot : getSelectedItems()) {
             GlusterVolumeSnapshotActionParameters param =
                     new 
GlusterVolumeSnapshotActionParameters(getEntity().getId(), 
snapshot.getSnapshotName(), true);
             paramsList.add(param);
@@ -366,7 +366,7 @@
     private void onActivateSnapshot() {
         runAction(VdcActionType.ActivateGlusterVolumeSnapshot,
                 new GlusterVolumeSnapshotActionParameters(getEntity().getId(),
-                        ((GlusterVolumeSnapshotEntity) 
getSelectedItem()).getSnapshotName(),
+                        getSelectedItem().getSnapshotName(),
                         true));
     }
 
@@ -391,7 +391,7 @@
     private void onDeactivateSnapshot() {
         runAction(VdcActionType.DeactivateGlusterVolumeSnapshot,
                 new GlusterVolumeSnapshotActionParameters(getEntity().getId(),
-                        ((GlusterVolumeSnapshotEntity) 
getSelectedItem()).getSnapshotName(),
+                        getSelectedItem().getSnapshotName(),
                         true));
     }
 
@@ -416,9 +416,10 @@
 
     @Override
     public GlusterVolumeEntity getEntity() {
-        return (GlusterVolumeEntity) super.getEntity();
+        return super.getEntity();
     }
 
+    @Override
     public void setEntity(GlusterVolumeEntity value) {
         super.setEntity(value);
     }


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

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

Reply via email to