diff --git a/distro/changelog.xml b/distro/changelog.xml index 53a87a4..5e95d4b 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,4 +1,8 @@ - + + + Issue #10831, Workspace download folder tomcat temp occupation issue + Feature #9760: WS-Thredds synch folder integration diff --git a/pom.xml b/pom.xml index b6b21d0..a3ab9a2 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.gcube.portlets.user workspace-tree-widget - 6.18.0-SNAPSHOT + 6.19.0-SNAPSHOT gCube Workspace Tree Widget gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace @@ -36,7 +36,7 @@ 1.7 1.8 - -Xdoclint:none + UTF-8 UTF-8 diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/util/FolderDownloadDialog.java b/src/main/java/org/gcube/portlets/user/workspace/client/util/FolderDownloadDialog.java index 142cfc7..308f30d 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/util/FolderDownloadDialog.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/util/FolderDownloadDialog.java @@ -16,6 +16,7 @@ import com.github.gwtbootstrap.client.ui.Icon; import com.github.gwtbootstrap.client.ui.Paragraph; import com.github.gwtbootstrap.client.ui.constants.IconType; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.http.client.RequestBuilder; @@ -23,6 +24,7 @@ import com.google.gwt.typedarrays.shared.ArrayBuffer; 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.client.ui.HTML; import com.google.gwt.user.client.ui.HasAlignment; import com.google.gwt.user.client.ui.VerticalPanel; @@ -37,14 +39,14 @@ public class FolderDownloadDialog extends GCubeDialog implements WebSocketListen private VerticalPanel topPanel = new VerticalPanel(); private Icon loading = new Icon(); Button close = new Button("Cancel Download"); - private Paragraph toShow = new Paragraph("Locating folder, please wait ..."); + private HTML toShow = new HTML("Locating folder, please wait ..."); private String webSocketURL; public FolderDownloadDialog(final FileDownloadEvent folder2Download, String username) { this.webSocket.setListener( this ); this.username = username; setText("Preparing folder download"); - + toShow.getElement().getStyle().setFontSize(14, Unit.PX); loading.setSpin(true); loading.setType(IconType.ROTATE_RIGHT); @@ -144,20 +146,12 @@ public class FolderDownloadDialog extends GCubeDialog implements WebSocketListen break; default: //the thread zipping has finished, is sending the zipped filepath on the server - toShow.setText("Compressing folder success, starting download"); - triggerDownloadFile(textData); + toShow.setHTML("Compressing folder success, click here to download"); loading.setIcon(IconType.OK_SIGN); loading.setSpin(false); - close.setText("Hide"); + close.setText("Close"); this.setModal(false); webSocket.close(); - Timer t = new Timer() { - @Override - public void run() { - hide(); - } - }; - t.schedule(1000); break; } } @@ -171,14 +165,6 @@ public class FolderDownloadDialog extends GCubeDialog implements WebSocketListen toShow.setText("Error contacting the server socket, please refresh this page and retry"); } - private void triggerDownloadFile(String filePathOnServer) { - try { - new RequestBuilderWorkspaceValidateItem(RequestBuilder.GET,ConstantsExplorer.DOWNLOAD_WORKSPACE_FOLDER_SERVLET, "filepath="+filePathOnServer, "_self", downloadHandlerCallback); - } catch (Exception e) { - new MessageBoxAlert("Error", e.getMessage(), null); - } - } - public AsyncCallback downloadHandlerCallback = new AsyncCallback() { @Override