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 user that the volume will be brought down to restore snapshot when volume is online. Change-Id: I34d27eed4d24c039bbe74c0b165e6a6dce9baa95 Bug-Url: https://bugzilla.redhat.com/1203454 Signed-off-by: Karnan TC <kchid...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/GlusterVolumeSnapshotListModel.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java 2 files changed, 3 insertions(+), 17 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/40516/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 c54afae..7d956fe 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,23 +245,12 @@ } ConfirmationModel model = new ConfirmationModel(); - GlusterVolumeSnapshotEntity snapshot = (GlusterVolumeSnapshotEntity) getSelectedItem(); setConfirmWindow(model); model.setTitle(ConstantsManager.getInstance().getMessages().confirmRestoreSnapshot(getEntity().getName())); model.setHelpTag(HelpTag.volume_restore_snapshot_confirmation); model.setHashName("volume_restore_snapshot_confirmation"); //$NON-NLS-1$ - if (snapshot.getStatus() == GlusterSnapshotStatus.ACTIVATED) { - model.setMessage(ConstantsManager.getInstance() - .getConstants() - .confirmVolumeSnapshotRestoreWithStopMessage()); - } else { - model.setMessage(ConstantsManager.getInstance().getConstants().confirmVolumeSnapshotRestoreMesage()); - } - - UICommand okCommand = new UICommand("onRestoreSnapshot", this); //$NON-NLS-1$ - okCommand.setTitle(ConstantsManager.getInstance().getConstants().ok()); - okCommand.setIsDefault(true); - getConfirmWindow().getCommands().add(okCommand); + model.setMessage(ConstantsManager.getInstance().getConstants().confirmVolumeSnapshotRestoreWithStopMessage()); + UICommand okCommand = UICommand.createDefaultOkUiCommand("onRestoreSnapshot", this); //$NON-NLS-1$ model.getCommands().add(okCommand); UICommand cancelCommand = new UICommand("cancelConfirmation", this); //$NON-NLS-1$ cancelCommand.setTitle(ConstantsManager.getInstance().getConstants().cancel()); @@ -282,7 +271,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()); 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 3e425f5..6af9d3f 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 @@ -2561,9 +2561,6 @@ @DefaultStringValue("User Name") String userName(); - @DefaultStringValue("Volume will be restored to the state of selected snapshot.\nDo you want to continue?") - String confirmVolumeSnapshotRestoreMesage(); - @DefaultStringValue("The volume will be brought down and restored to the state of the selected snapshot.\nDo you want to continue?") String confirmVolumeSnapshotRestoreWithStopMessage(); -- To view, visit https://gerrit.ovirt.org/40516 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34d27eed4d24c039bbe74c0b165e6a6dce9baa95 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5-gluster Gerrit-Owner: Karnan t c <kchid...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches