diff options
author | Selvasundaram <selvam@gluster.com> | 2011-09-07 17:25:25 +0530 |
---|---|---|
committer | Selvasundaram <selvam@gluster.com> | 2011-09-07 17:25:25 +0530 |
commit | e225f59bacc493a122e886d68ea68cb7f7a6bfb6 (patch) | |
tree | 18f4656b38ff0798b20cf92a2f8d5d15b7aa203a /src/com.gluster.storage.management.console/src | |
parent | 2c4bb8a610406a5b4641c462f0f058c533d0f075 (diff) | |
parent | 66ddede85d57046dc5a7728d200741ecfb2baca8 (diff) |
Merge branch 'master' of github.com:gluster/console
Diffstat (limited to 'src/com.gluster.storage.management.console/src')
2 files changed, 34 insertions, 62 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 df24f15b..752954e8 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,37 +41,23 @@ public class DownloadVolumeLogsAction extends AbstractActionDelegate { @Override protected void performAction(IAction action) { final VolumesClient client = new VolumesClient(); - final Runnable downloadLogsThread = new Runnable() { - - @Override - public void run() { - 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(); - - 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()); - } - } - }; - - BusyIndicator.showWhile(Display.getDefault(), new Runnable() { - - @Override - public void run() { - Display.getDefault().asyncExec(downloadLogsThread); - } - }); + 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(); + + 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()); + } } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java index 2f0d03dc..ac61709d 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java +++ b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java @@ -37,36 +37,22 @@ public class ExportSshKeysAction extends AbstractActionDelegate { @Override protected void performAction(IAction action) { final KeysClient client = new KeysClient(); - final Runnable exportKeysThread = new Runnable() { - - @Override - public void run() { - FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); - dialog.setFilterNames(new String[] {"Tar (*.tar)"}); - dialog.setFilterExtensions(new String[] {"*.tar"}); - String filePath = dialog.open(); - - if(filePath == null) { - return; - } - - String title = "Export SSH Keys"; - try { - client.exportSshKeys(filePath); - showInfoDialog(title, "SSH keys exported successfully to [" + filePath + "]"); - } catch(Exception e) { - showErrorDialog(title, e.getMessage()); - } - } - }; - - BusyIndicator.showWhile(Display.getDefault(), new Runnable() { - - @Override - public void run() { - Display.getDefault().asyncExec(exportKeysThread); - } - }); + FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); + dialog.setFilterNames(new String[] { "Tar (*.tar)" }); + dialog.setFilterExtensions(new String[] { "*.tar" }); + String filePath = dialog.open(); + + if (filePath == null) { + return; + } + + String title = "Export SSH Keys"; + try { + client.exportSshKeys(filePath); + showInfoDialog(title, "SSH keys exported successfully to [" + filePath + "]"); + } catch (Exception e) { + showErrorDialog(title, e.getMessage()); + } } |