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:
parent
877ceb2bad
commit
ee50d7464b
|
@ -156,8 +156,7 @@ public class FileUploadPanel extends FormPanel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void operationUpdate(float elaborated) {
|
public void operationUpdate(float elaborated) {
|
||||||
// TODO Auto-generated method stub
|
//
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -46,19 +46,20 @@ public class FileUploadProgressUpdater extends Timer {
|
||||||
Log.info("retrieved FileUploadMonitor: "+result.getState());
|
Log.info("retrieved FileUploadMonitor: "+result.getState());
|
||||||
switch (result.getState()) {
|
switch (result.getState()) {
|
||||||
case STARTED:
|
case STARTED:
|
||||||
Log.info("File Upload Started");
|
Log.debug("File Upload Started");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case INPROGRESS:
|
case INPROGRESS:
|
||||||
fireOperationUpdate(result.getElaboratedLenght());
|
Log.debug("Progress: "+result.getElaboratedLenght()+" of "+result.getTotalLenght());
|
||||||
|
fireOperationUpdate(result.getPercentDone());
|
||||||
break;
|
break;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
|
Log.debug("File Upload Failed");
|
||||||
cancel();
|
cancel();
|
||||||
fireOperationFailed(new Throwable("Failed Client Library Import") ,result.getFailureReason(), result.getFailureDetails());
|
fireOperationFailed(new Throwable("Failed Client Library Import") ,result.getFailureReason(), result.getFailureDetails());
|
||||||
break;
|
break;
|
||||||
case COMPLETED:
|
case COMPLETED:
|
||||||
cancel();
|
cancel();
|
||||||
Log.info("File Upload Completed");
|
Log.debug("File Upload Completed");
|
||||||
fireOperationComplete();
|
fireOperationComplete();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -77,6 +78,8 @@ public class FileUploadProgressUpdater extends Timer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected String getStack(Throwable e)
|
protected String getStack(Throwable e)
|
||||||
{
|
{
|
||||||
String message = e.getLocalizedMessage()+" -> <br>";
|
String message = e.getLocalizedMessage()+" -> <br>";
|
||||||
|
|
Loading…
Reference in New Issue