Fixed the problem of progress indicator on file upload progress bar

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@85239 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-11-08 16:32:46 +00:00
parent 877ceb2bad
commit ee50d7464b
2 changed files with 8 additions and 6 deletions

View File

@ -156,8 +156,7 @@ public class FileUploadPanel extends FormPanel {
@Override
public void operationUpdate(float elaborated) {
// TODO Auto-generated method stub
//
}
@Override

View File

@ -46,19 +46,20 @@ public class FileUploadProgressUpdater extends Timer {
Log.info("retrieved FileUploadMonitor: "+result.getState());
switch (result.getState()) {
case STARTED:
Log.info("File Upload Started");
Log.debug("File Upload Started");
break;
case INPROGRESS:
fireOperationUpdate(result.getElaboratedLenght());
Log.debug("Progress: "+result.getElaboratedLenght()+" of "+result.getTotalLenght());
fireOperationUpdate(result.getPercentDone());
break;
case FAILED:
Log.debug("File Upload Failed");
cancel();
fireOperationFailed(new Throwable("Failed Client Library Import") ,result.getFailureReason(), result.getFailureDetails());
break;
case COMPLETED:
cancel();
Log.info("File Upload Completed");
Log.debug("File Upload Completed");
fireOperationComplete();
break;
default:
@ -77,6 +78,8 @@ public class FileUploadProgressUpdater extends Timer {
}
protected String getStack(Throwable e)
{
String message = e.getLocalizedMessage()+" -> <br>";