summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelvasundaram <selvam@gluster.com>2011-09-07 19:23:45 +0530
committerSelvasundaram <selvam@gluster.com>2011-09-07 19:23:45 +0530
commita8ae219a2652a51c69f8651ee4aac91d058979f6 (patch)
tree44fb72d55739f73f90a24efbb9081dbb12023bec
parente225f59bacc493a122e886d68ea68cb7f7a6bfb6 (diff)
parent0cbd8c21223b21d941e4f83599b0c08ed14293f5 (diff)
Merge branch 'master' of github.com:gluster/console
-rw-r--r--src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java23
1 files changed, 14 insertions, 9 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 752954e8..8a42951a 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
@@ -41,23 +41,28 @@ public class DownloadVolumeLogsAction extends AbstractActionDelegate {
@Override
protected void performAction(IAction action) {
final VolumesClient client = new VolumesClient();
- Volume volume = guiHelper.getSelectedEntity(getWindow(), Volume.class);
+ final 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" });
- String filePath = dialog.open();
+ final String filePath = dialog.open();
if (filePath == null) {
return;
}
- 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());
- }
+ 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());
+ }
+ }
+ });
}
}