From 61c5568d4d016566015fb7f7880389f51ef6d589 Mon Sep 17 00:00:00 2001 From: "giancarlo.panichi" Date: Mon, 30 May 2016 16:54:11 +0000 Subject: [PATCH] refs 4041: Accounting Manager portlet: give possibility to download raw data to users https://support.d4science.org/issues/4041 Added CSV file creation on workspace git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/accounting-manager@128909 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/AccountingManagerController.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/gcube/portlets/admin/accountingmanager/client/AccountingManagerController.java b/src/main/java/org/gcube/portlets/admin/accountingmanager/client/AccountingManagerController.java index ce213b2..d225026 100644 --- a/src/main/java/org/gcube/portlets/admin/accountingmanager/client/AccountingManagerController.java +++ b/src/main/java/org/gcube/portlets/admin/accountingmanager/client/AccountingManagerController.java @@ -38,6 +38,7 @@ import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat; import com.google.gwt.i18n.client.LocaleInfo; import com.google.gwt.user.client.Cookies; import com.google.gwt.user.client.Timer; +import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.datepicker.client.CalendarUtil; import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer; @@ -447,7 +448,7 @@ public class AccountingManagerController { } - private void doDownloadCSV(ItemDescription itemDescription) { + private void doDownloadCSV(final ItemDescription itemDescription) { Log.debug("DownloadCSV from server: " + itemDescription); AccountingManagerServiceAsync.INSTANCE.getPublicLink(itemDescription, new AsyncCallback() { @@ -467,10 +468,10 @@ public class AccountingManagerController { } @Override - public void onSuccess(String result) { + public void onSuccess(String link) { accountingMonitor.hide(); - Log.debug("Link: " + result); - + Log.debug("Retrieved link: " + link); + Window.open(link, itemDescription.getName(), ""); } }); }