429: Workspace: uploading big files

Task-Url: https://support.d4science.org/issues/429

Fixed bug on getProgress

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-uploader@119705 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2015-10-13 15:24:11 +00:00
parent 545de072e7
commit a2754c67f3
2 changed files with 9 additions and 3 deletions

View File

@ -30,7 +30,7 @@ import com.google.gwt.user.client.ui.VerticalPanel;
public class UploaderProgressView {
private VerticalPanel vp = new VerticalPanel();
private static final int MAX_CHARS = 55;
private static final int MAX_CHARS = 50;
private HorizontalPanel hp = new HorizontalPanel();
private HorizontalPanel hpBar = new HorizontalPanel();
private HTML html = new HTML();
@ -156,7 +156,7 @@ public class UploaderProgressView {
// GWT.log(text);
html.setHTML(text);
if(uploader.getUploadProgress().getLastEvent()!=null)
if(uploader.getUploadProgress()!=null && uploader.getUploadProgress().getLastEvent()!=null)
bar.update(uploader.getUploadProgress().getLastEvent().getReadPercentage());
else
bar.update(0);

View File

@ -43,7 +43,13 @@ public class WorkspaceUploaderServiceImpl extends RemoteServiceServlet implement
}
// getThreadIds();
logger.trace("returning uploader: "+uploader.getClientUploadKey() +" status: "+uploader.getUploadStatus() +", progress: "+uploader.getUploadProgress().getLastEvent());
String progress = "";
if(uploader.getUploadProgress()!=null && uploader.getUploadProgress().getLastEvent()!=null)
progress = uploader.getUploadProgress().getLastEvent().toString();
else
progress = "upload progress is null or last event is null";
logger.info("returning uploader: "+uploader.getClientUploadKey() +" status: "+uploader.getUploadStatus() +", progress: "+progress);
return uploader;
}