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