Merge pull request 'task_24532' (!13) from task_24532 into master

Reviewed-on: #13
This commit is contained in:
Francesco Mangiacrapa 2023-02-03 15:24:09 +01:00
commit f1fde26359
18 changed files with 98 additions and 45 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/geoportal-data-viewer-app-3.2.1-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"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/geoportal-data-viewer-app-3.2.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -35,5 +35,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.2.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/geoportal-data-viewer-app-3.2.1-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,4 +1,4 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.2.0-SNAPSHOT lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.2.1-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
@ -46,8 +46,12 @@
<wb-module deploy-name="geoportal-data-viewer-app-3.2.0-SNAPSHOT">
<wb-module deploy-name="geoportal-data-viewer-app-3.2.1-SNAPSHOT">
@ -95,7 +99,9 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
@ -143,7 +149,9 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -191,7 +199,9 @@
<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"/>
@ -239,7 +249,9 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
@ -287,7 +299,12 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-data-common-2.0.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -335,7 +352,9 @@
<property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/> <property name="java-output-path" value="/geoportal-data-viewer-app/target/geoportal-data-viewer-app-0.0.1-SNAPSHOT/WEB-INF/classes"/>
@ -383,7 +402,9 @@
<property name="context-root" value="geoportal-data-viewer-app"/> <property name="context-root" value="geoportal-data-viewer-app"/>
@ -431,7 +452,9 @@
</wb-module> </wb-module>

View File

@ -4,6 +4,13 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v3.2.1-SNAPSHOT] - 2023-02-03
#### Fixes
- [#24432] Reverting serialization LinkedHashMap<String, String> to LinkedHashMap<String, Object>.
- Improved Alert Ux in case of broken shared link
## [v3.2.0] - 2023-01-31 ## [v3.2.0] - 2023-01-31
#### Enhancements #### Enhancements

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId> <artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>3.2.0</version> <version>3.2.1-SNAPSHOT</version>
<name>GeoPortal Data Viewer App</name> <name>GeoPortal Data Viewer App</name>
<description>The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface</description> <description>The GeoPortal Data Viewer App is an application to access, discovery and navigate the Geoportal projects/documents by a Web-Map Interface</description>

View File

@ -64,6 +64,7 @@ import org.gcube.portlets.user.geoportaldataviewer.shared.gis.BaseMapLayer;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery; import org.gcube.portlets.user.geoportaldataviewer.shared.gis.GeoQuery;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem; import org.gcube.portlets.user.geoportaldataviewer.shared.gis.LayerItem;
import com.github.gwtbootstrap.client.ui.Modal;
import com.github.gwtbootstrap.client.ui.Popover; import com.github.gwtbootstrap.client.ui.Popover;
import com.github.gwtbootstrap.client.ui.constants.Placement; import com.github.gwtbootstrap.client.ui.constants.Placement;
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.EntryPoint;
@ -362,7 +363,7 @@ public class GeoportalDataViewer implements EntryPoint {
if (!ucdIds.contains(collId)) { if (!ucdIds.contains(collId)) {
GWT.log("!! Collection " + collId + " is not available"); GWT.log("!! Collection " + collId + " is not available");
Window.alert("Collection " + collId + " is not found."); Window.alert("Collection " + collId + " not found.");
} else { } else {
GCubeCollection toOpen = theConfig.getAvailableCollections().get(collId); GCubeCollection toOpen = theConfig.getAvailableCollections().get(collId);
@ -449,9 +450,22 @@ public class GeoportalDataViewer implements EntryPoint {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Window.alert(caught.getMessage()); // Window.alert(caught.getMessage());
mainPanel.hidePanelDetails(); mainPanel.hidePanelDetails();
Modal errorModal = new Modal(true, true);
errorModal.setCloseVisible(true);
errorModal.setTitle("Oops...");
Image geoportalError = new Image(GNAImages.ICONS.warningError());
FlowPanel errorPanelMsg = new FlowPanel();
errorPanelMsg.getElement().addClassName("general_warning");
errorPanelMsg.add(geoportalError);
errorPanelMsg.add(new HTML("D4S GeoPortal"));
HTML erroMessage = new HTML(
"Oops something went wrong, either the project does not exist or it has not been published yet");
errorPanelMsg.add(erroMessage);
errorModal.add(errorPanelMsg);
errorModal.show();
} }
@Override @Override
@ -779,8 +793,9 @@ public class GeoportalDataViewer implements EntryPoint {
//console.log("jsonObj: "+jsonObj); //console.log("jsonObj: "+jsonObj);
return jsonObj; return jsonObj;
}-*/; }-*/;
// /** // /**
// * Handler popu closer. // * Handler popup closer.
// * // *
// * @param divId the div id // * @param divId the div id
// * @param overlayId the overlay id // * @param overlayId the overlay id

View File

@ -159,7 +159,7 @@ public interface GeoportalDataViewerService extends RemoteService {
* @param limit the limit * @param limit the limit
* @return the entry sets document for project ID * @return the entry sets document for project ID
*/ */
LinkedHashMap<String, String> getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit); LinkedHashMap<String, Object> getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit);
/** /**
* Gets the relationships for timeline. * Gets the relationships for timeline.

View File

@ -70,7 +70,7 @@ public interface GeoportalDataViewerServiceAsync {
void getInitialConfiguration(AsyncCallback<ViewerConfiguration> callback); void getInitialConfiguration(AsyncCallback<ViewerConfiguration> callback);
void getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit, void getEntrySetsDocumentForProjectID(String profileID, String projectID, int limit,
AsyncCallback<LinkedHashMap<String, String>> callback); AsyncCallback<LinkedHashMap<String, Object>> callback);
void getRelationshipsForTimeline(String profileID, String projectID, AsyncCallback<List<String>> callback); void getRelationshipsForTimeline(String profileID, String projectID, AsyncCallback<List<String>> callback);

View File

@ -930,7 +930,7 @@ public class LayerManager {
intFlex.setCellPadding(1); intFlex.setCellPadding(1);
intFlex.setCellSpacing(1); intFlex.setCellSpacing(1);
if (projectDV.getTheDocument() != null) { if (projectDV.getTheDocument() != null) {
LinkedHashMap<String, String> map = projectDV.getTheDocument().getDocumentAsMap(); LinkedHashMap<String, Object> map = projectDV.getTheDocument().getDocumentAsMap();
// my-html-table // my-html-table
// intFlex.getElement().addClassName("my-html-table"); // intFlex.getElement().addClassName("my-html-table");
int i = 0; int i = 0;
@ -1140,7 +1140,7 @@ public class LayerManager {
intFlex.setCellPadding(1); intFlex.setCellPadding(1);
intFlex.setCellSpacing(1); intFlex.setCellSpacing(1);
if (projectDV.getTheDocument() != null) { if (projectDV.getTheDocument() != null) {
LinkedHashMap<String, String> map = projectDV.getTheDocument().getDocumentAsMap(); LinkedHashMap<String, Object> map = projectDV.getTheDocument().getDocumentAsMap();
// my-html-table // my-html-table
// intFlex.getElement().addClassName("my-html-table"); // intFlex.getElement().addClassName("my-html-table");
// int i = 0; // int i = 0;

View File

@ -475,7 +475,7 @@ public abstract class OpenLayerMap {
ImageWms imageWMSSource = wmsLayer.getSource(); ImageWms imageWMSSource = wmsLayer.getSource();
ImageWmsParams imageWMSParams = imageWMSSource.getParams(); ImageWmsParams imageWMSParams = imageWMSSource.getParams();
if (cqlFilterExpression == null || cqlFilterExpression.length()>MAX_LENGHT_CQL_FOR_GET_REQUEST) { if (cqlFilterExpression == null || cqlFilterExpression.length() > MAX_LENGHT_CQL_FOR_GET_REQUEST) {
imageWMSParams.delete("CQL_FILTER"); imageWMSParams.delete("CQL_FILTER");
} else { } else {
imageWMSParams.set("CQL_FILTER", cqlFilterExpression); imageWMSParams.set("CQL_FILTER", cqlFilterExpression);
@ -483,13 +483,8 @@ public abstract class OpenLayerMap {
imageWMSSource.updateParams(imageWMSParams); imageWMSSource.updateParams(imageWMSParams);
wmsLayer.setSource(imageWMSSource); wmsLayer.setSource(imageWMSSource);
wmsLayer.changed();
wmsLayer.changed(); wmsLayer.changed();
//map.addLayer(wmsLayer);
} }
/** /**
@ -647,7 +642,7 @@ public abstract class OpenLayerMap {
Style style = new Style(); Style style = new Style();
StrokeOptions strokeOptions = new StrokeOptions(); StrokeOptions strokeOptions = new StrokeOptions();
strokeOptions.setColor(new Color(255, 0, 0, 0.8)); strokeOptions.setColor(new Color(255, 69, 0, 0.8));
strokeOptions.setWidth(5); strokeOptions.setWidth(5);
Stroke stroke = new Stroke(strokeOptions); Stroke stroke = new Stroke(strokeOptions);
stroke.setWidth(2); stroke.setWidth(2);

View File

@ -59,7 +59,10 @@ public interface GNAImages extends ClientBundle {
@Source("spinner_clock.gif") @Source("spinner_clock.gif")
ImageResource spinnerClock(); ImageResource spinnerClock();
@Source("geoporta_error.png") @Source("geoportal_error.png")
ImageResource geoportaServiceError(); ImageResource geoportaServiceError();
@Source("warning_error.png")
ImageResource warningError();
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -14,7 +14,7 @@ public class ProjectUtil {
if (document == null) if (document == null)
return htmlCode; return htmlCode;
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap(); Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
if (firstEntrySet != null) { if (firstEntrySet != null) {
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>"; htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
} }
@ -32,7 +32,7 @@ public class ProjectUtil {
if (document == null) if (document == null)
return htmlCode; return htmlCode;
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap(); Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
if (firstEntrySet != null) { if (firstEntrySet != null) {
htmlCode += showkey ? firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>" htmlCode += showkey ? firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>"
: firstEntrySet.getValue(); : firstEntrySet.getValue();
@ -51,7 +51,7 @@ public class ProjectUtil {
if (document == null) if (document == null)
return htmlCode; return htmlCode;
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap(); Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
if (firstEntrySet != null) { if (firstEntrySet != null) {
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>"; htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
} }

View File

@ -121,7 +121,7 @@ public class ViewRelationshipPanel extends Composite {
firstProjectPanelContainer.clear(); firstProjectPanelContainer.clear();
secondProjectPanelContainer.clear(); secondProjectPanelContainer.clear();
Entry<String, String> firstEntrySet = project.getTheDocument().getFirstEntryOfMap(); Entry<String, Object> firstEntrySet = project.getTheDocument().getFirstEntryOfMap();
String htmlMsg = firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b> (id: " + project.getId() String htmlMsg = firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b> (id: " + project.getId()
+ ")"; + ")";

View File

@ -101,10 +101,10 @@ public class DragDropLayer extends FlowPanel {
labelProject.setTitle(referProjectID); labelProject.setTitle(referProjectID);
GeoportalDataViewerServiceAsync.Util.getInstance().getEntrySetsDocumentForProjectID( GeoportalDataViewerServiceAsync.Util.getInstance().getEntrySetsDocumentForProjectID(
layerObject.getProjectDV().getProfileID(), layerObject.getProjectDV().getId(), 1, layerObject.getProjectDV().getProfileID(), layerObject.getProjectDV().getId(), 1,
new AsyncCallback<LinkedHashMap<String, String>>() { new AsyncCallback<LinkedHashMap<String, Object>>() {
@Override @Override
public void onSuccess(LinkedHashMap<String, String> result) { public void onSuccess(LinkedHashMap<String, Object> result) {
String realProjectName = ""; String realProjectName = "";
if (result != null) { if (result != null) {
for (String key : result.keySet()) { for (String key : result.keySet()) {

View File

@ -1111,7 +1111,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
if (layerObject.getProjectDV().getTheDocument() == null) { if (layerObject.getProjectDV().getTheDocument() == null) {
try { try {
LinkedHashMap<String, String> documentAsMap = getEntrySetsDocumentForProjectID( LinkedHashMap<String, Object> documentAsMap = getEntrySetsDocumentForProjectID(
layerObject.getProfileID(), layerObject.getProjectID(), 1); layerObject.getProfileID(), layerObject.getProjectID(), 1);
DocumentDV documentDV = new DocumentDV(); DocumentDV documentDV = new DocumentDV();
documentDV.setDocumentAsMap(documentAsMap); documentDV.setDocumentAsMap(documentAsMap);
@ -1207,7 +1207,7 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
}); });
if (loadDocument) { if (loadDocument) {
LinkedHashMap<String, String> theDocument = getEntrySetsDocumentForProjectID(profileID, projectID, LinkedHashMap<String, Object> theDocument = getEntrySetsDocumentForProjectID(profileID, projectID,
limitDocumentEntries); limitDocumentEntries);
DocumentDV docDV = new DocumentDV(); DocumentDV docDV = new DocumentDV();
docDV.setDocumentAsMap(theDocument); docDV.setDocumentAsMap(theDocument);
@ -1256,11 +1256,11 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
* @return the entry sets document for project ID * @return the entry sets document for project ID
*/ */
@Override @Override
public LinkedHashMap<String, String> getEntrySetsDocumentForProjectID(String profileID, String projectID, public LinkedHashMap<String, Object> getEntrySetsDocumentForProjectID(String profileID, String projectID,
int limit) { int limit) {
LOG.debug("called getEntrySetsDocumentForProjectID for profileID: " + profileID + ", projectID: " + projectID); LOG.debug("called getEntrySetsDocumentForProjectID for profileID: " + profileID + ", projectID: " + projectID);
LinkedHashMap<String, String> documentAsMap = new LinkedHashMap<String, String>(limit); LinkedHashMap<String, Object> documentAsMap = new LinkedHashMap<String, Object>(limit);
try { try {

View File

@ -720,11 +720,11 @@ Table Of Contents (TOC)
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
margin: 0; margin: 0;
position: absolute; position: absolute;
top: 50%; top: 50%;
width: 100%; width: 100%;
-ms-transform: translateY(-50%); -ms-transform: translateY(-50%);
transform: translateY(-50%); transform: translateY(-50%);
} }
.general_error div { .general_error div {
@ -732,6 +732,16 @@ Table Of Contents (TOC)
} }
.general_warning {
text-align: center;
font-size: 20px;
}
.general_warning div {
padding: 20px;
}
/****************************** /******************************
RESPONSIVE RESPONSIVE
*******************************/ *******************************/