Issue #10831, Workspace download folder tomcat temp occupation issue. the zipped file is deleted from the gateway temp right after it is copied to the storage volatile area. An http link to download the file via the URI Resolver is then given to the user
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@162013 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6dd28cceb7
commit
61cee757ac
|
@ -1,4 +1,8 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-19-0"
|
||||
date="2019-01-09">
|
||||
<Change>Issue #10831, Workspace download folder tomcat temp occupation issue</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet-tree.6-18-0"
|
||||
date="2017-09-29">
|
||||
<Change>Feature #9760: WS-Thredds synch folder integration</Change>
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>workspace-tree-widget</artifactId>
|
||||
<version>6.18.0-SNAPSHOT</version>
|
||||
<version>6.19.0-SNAPSHOT</version>
|
||||
<name>gCube Workspace Tree Widget</name>
|
||||
<description>
|
||||
gCube Workspace Tree Widget is a widget to navigate and interact with gCube Workspace
|
||||
|
@ -36,7 +36,7 @@
|
|||
<!-- GWT needs at least java 1.6 -->
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
<!-- <additionalparam>-Xdoclint:none</additionalparam> -->
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
|
|
@ -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, <a title=\""+textData+"\" href=\""+textData+"\">click here</a> 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<WindowOpenParameter> downloadHandlerCallback = new AsyncCallback<WindowOpenParameter>() {
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue