diff --git a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/MonitorPanel.java b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/MonitorPanel.java index f957908..d1a4e2d 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/MonitorPanel.java +++ b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/MonitorPanel.java @@ -68,9 +68,6 @@ public class MonitorPanel extends ScrollPanel{ hpBottomPanel.setWidth("100%"); hpBottomPanel.add(labelNumbUpload); -// mainPanel.add(hpNumbUpload); -// mainPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); - //LIST OF UPLOADS vpListUpload.getElement().getStyle().setMargin(5, Unit.PX); // setHeight("500px"); @@ -78,14 +75,10 @@ public class MonitorPanel extends ScrollPanel{ ScrollPanel scroll = new ScrollPanel(); scroll.add(vpListUpload); scroll.setHeight("200px"); -// scroll.getElement().getStyle().setBorderStyle(BorderStyle.SOLID); -// scroll.getElement().getStyle().setBorderWidth(1.0, Unit.PX); mainPanel.add(scroll); //CLOSE MONITOR -// hpCloseMonitor.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); -// hpCloseMonitor.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); Button bClose = new Button("Close"); bClose.addClickHandler(new ClickHandler() { @@ -95,8 +88,6 @@ public class MonitorPanel extends ScrollPanel{ } }); -// hpNumbUpload.add(bClose); - hpCloseMonitor.add(bClose); hpCloseMonitor.addStyleName("align-right-close"); hpBottomPanel.add(hpCloseMonitor); diff --git a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderMonitor.java b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderMonitor.java index 975fd0f..2ac536e 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderMonitor.java +++ b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/client/uploader/UploaderMonitor.java @@ -112,16 +112,6 @@ public class UploaderMonitor { GWT.log("onResponseReceived "+result); final HandlerResultMessage resultMessage = HandlerResultMessage.parseResult(result); -// timer.cancel(); -// int indexQueue = getQueueIndexFromClientUploadKey(clientKey); -// goNextUploaderFromKey(clientKey, queue, indexQueue); -// deleteTimerEvent.getUploader().setUploadStatus(UPLOAD_STATUS.ABORTED); -// notifyUploadAborted(deleteTimerEvent.getUploader().getFile().getParentId(), null); - -// if(timer!=null) -// timer.cancel(); -// goNextUploaderAfterKey(clientKey); - GWT.log("Cancel Upload Stream result: "+resultMessage); if(resultMessage==null) return; @@ -130,6 +120,7 @@ public class UploaderMonitor { case ERROR:{ GWT.log("ERROR: Error during stop upload "+resultMessage.getMessage()); Window.alert("Sorry, An error occurred during upload abort! "+resultMessage.getMessage()); + goNextUploaderAfterKey(clientKey); break; } case OK:{ @@ -155,7 +146,9 @@ public class UploaderMonitor { case UNKNOWN: case WARN:{ GWT.log("UNKNOWN/WARN CASE: Error during stop upload "+resultMessage.getMessage()); + goNextUploaderAfterKey(clientKey); break; + } } } @@ -163,11 +156,13 @@ public class UploaderMonitor { @Override public void onError(Request request, Throwable exception) { GWT.log("ERROR: Error during stop upload "+exception.getMessage()); + goNextUploaderAfterKey(clientKey); } }); } catch (RequestException e) { GWT.log("RequestException: Error during stop upload "+e.getMessage()); + goNextUploaderAfterKey(clientKey); } } }); diff --git a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/server/util/WsUtil.java b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/server/util/WsUtil.java index d33d099..cbcab49 100644 --- a/src/main/java/org/gcube/portlets/widgets/workspaceuploader/server/util/WsUtil.java +++ b/src/main/java/org/gcube/portlets/widgets/workspaceuploader/server/util/WsUtil.java @@ -212,7 +212,7 @@ public class WsUtil { */ public static void putWorkspaceUploaderInSession(final HttpSession httpSession, WorkspaceUploaderItem uploader) throws Exception { - logger.trace("Put workspace uploader in session: "+uploader); + logger.trace("Put workspace uploader in session: "+uploader.getIdentifier() + ", STATUS: "+uploader.getUploadStatus()); final ASLSession session = getAslSession(httpSession); if(uploader.getIdentifier()==null || uploader.getIdentifier().isEmpty())