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
This commit is contained in:
Giancarlo Panichi 2016-05-30 16:54:11 +00:00
parent 22026c1d1b
commit 61c5568d4d
1 changed files with 5 additions and 4 deletions

View File

@ -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<String>() {
@ -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(), "");
}
});
}