diff options
-rw-r--r-- | src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java index edf09f33..81abb01f 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java @@ -39,28 +39,23 @@ public class DownloadVolumeLogsAction extends AbstractActionDelegate { @Override protected void performAction(IAction action) { final VolumesClient client = new VolumesClient(); - final Volume volume = guiHelper.getSelectedEntity(getWindow(), Volume.class); + Volume volume = guiHelper.getSelectedEntity(getWindow(), Volume.class); FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); dialog.setFilterNames(new String[] { "GZipped Tar (*.tar.gz)" }); dialog.setFilterExtensions(new String[] { "*.tar.gz" }); - final String filePath = dialog.open(); + String filePath = dialog.open(); if (filePath == null) { return; } - Display.getDefault().asyncExec(new Runnable() { - @Override - public void run() { - String title = "Download Volume Logs [" + volume.getName() + "]"; - try { - client.downloadLogs(volume.getName(), filePath); - showInfoDialog(title, "Volume logs downloaded successfully to [" + filePath + "]"); - } catch (Exception e) { - showErrorDialog(title, e.getMessage()); - } - } - }); + String title = "Download Volume Logs [" + volume.getName() + "]"; + try { + client.downloadLogs(volume.getName(), filePath); + showInfoDialog(title, "Volume logs downloaded successfully to [" + filePath + "]"); + } catch (Exception e) { + showErrorDialog(title, e.getMessage()); + } } } |