fix for Incident #1511
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@121799 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0b3278c7ce
commit
fe040818cf
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/reports-5.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/reports-5.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
@ -31,5 +31,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/reports-5.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/reports-5.1.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<dependent-module archiveName="gcube-reporting-modeler-1.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-modeler/gcube-reporting-modeler">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="gcube-reporting-library-3.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-library/gcube-reporting-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="reports"/>
|
||||
</wb-module>
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>reports</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>5.0.0-SNAPSHOT</version>
|
||||
<version>5.1.0-SNAPSHOT</version>
|
||||
<name>gCube Reports Manager</name>
|
||||
<description>
|
||||
gCube Reports Portlet.
|
||||
|
@ -79,6 +79,12 @@
|
|||
<version>${gwtVersion}</version>
|
||||
<scope>${setScope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-dev</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-scope-maps</artifactId>
|
||||
|
|
|
@ -71,6 +71,9 @@ import org.gcube.portlets.widgets.fileupload.client.events.FileUploadSelectedEve
|
|||
import org.gcube.portlets.widgets.fileupload.client.events.FileUploadSelectedEventHandler;
|
||||
import org.gcube.portlets.widgets.fileupload.client.view.UploadProgressDialog;
|
||||
|
||||
import com.extjs.gxt.ui.client.event.Listener;
|
||||
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
|
||||
import com.extjs.gxt.ui.client.widget.Dialog;
|
||||
import com.extjs.gxt.ui.client.widget.MessageBox;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.RunAsyncCallback;
|
||||
|
@ -1344,37 +1347,42 @@ public class Presenter {
|
|||
*
|
||||
*/
|
||||
public void exportReportToRSG() {
|
||||
if (Window.confirm("Are you sure you want to commit the " + model.getTemplateName() + " into the VME Database?")) {
|
||||
dlg.center();
|
||||
dlg.show();
|
||||
Model toSave = model.getSerializableModel();
|
||||
reportService.exportReportToRSG(currentVmeType, toSave, new AsyncCallback<VmeExportResponse>() {
|
||||
public void onFailure(Throwable caught) {
|
||||
dlg.hide();
|
||||
MessageBox.alert("Warning","Report Not Exported: " + caught.getMessage(), null);
|
||||
}
|
||||
public void onSuccess(VmeExportResponse response) {
|
||||
dlg.hide();
|
||||
//write ok
|
||||
if (response.isGloballySucceded()) {
|
||||
MessageBox.info("Exporting to RSG Operation","Report Exported Successfully", null);
|
||||
newDoc();
|
||||
}
|
||||
//runtime exception
|
||||
else if (response.getResponseMessageList().size() == 1 && response.getResponseMessageList().get(0).getResponseEntryCode().equals("RUNTIME_EXCEPTION")) {
|
||||
MessageBox.alert("Exporting to RSG Operation Failed","Report Exporting has failed for the following reason: <br/> " + response.getResponseMessageList().get(0).getResponseMessage(), null);
|
||||
}
|
||||
//user report compile exception
|
||||
else {
|
||||
String failReasons = "";
|
||||
for (VmeResponseEntry entry : response.getResponseMessageList()) {
|
||||
failReasons += entry.getResponseMessage() + "<br/>";
|
||||
}
|
||||
MessageBox.alert("Exporting to RSG Operation Failed","Report Exporting has failed for the following reasons: <br/> " + failReasons, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
MessageBox.confirm("Commit to VME-DB", "Are you sure you want to commit the " + model.getTemplateName() + " into the VME Database?", new Listener<MessageBoxEvent>() {
|
||||
@Override
|
||||
public void handleEvent(MessageBoxEvent be) {
|
||||
if(Dialog.YES.equalsIgnoreCase(be.getButtonClicked().getItemId())) {
|
||||
dlg.center();
|
||||
Model toSave = model.getSerializableModel();
|
||||
reportService.exportReportToRSG(currentVmeType, toSave, new AsyncCallback<VmeExportResponse>() {
|
||||
public void onFailure(Throwable caught) {
|
||||
dlg.hide();
|
||||
MessageBox.alert("Warning","Report Not Exported: " + caught.getMessage(), null);
|
||||
}
|
||||
public void onSuccess(VmeExportResponse response) {
|
||||
dlg.hide();
|
||||
//write ok
|
||||
if (response.isGloballySucceded()) {
|
||||
MessageBox.info("Exporting to RSG Operation","Report Exported Successfully", null);
|
||||
newDoc();
|
||||
}
|
||||
//runtime exception
|
||||
else if (response.getResponseMessageList().size() == 1 && response.getResponseMessageList().get(0).getResponseEntryCode().equals("RUNTIME_EXCEPTION")) {
|
||||
MessageBox.alert("Exporting to RSG Operation Failed","Report Exporting has failed for the following reason: <br/> " + response.getResponseMessageList().get(0).getResponseMessage(), null);
|
||||
}
|
||||
//user report compile exception
|
||||
else {
|
||||
String failReasons = "";
|
||||
for (VmeResponseEntry entry : response.getResponseMessageList()) {
|
||||
failReasons += entry.getResponseMessage() + "<br/>";
|
||||
}
|
||||
MessageBox.alert("Exporting to RSG Operation Failed","Report Exporting has failed for the following reasons: <br/> " + failReasons, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void deleteVMEReport(String reportId, String name, final VMETypeIdentifier type) {
|
||||
|
|
Reference in New Issue