task_24532 #13

Merged
francesco.mangiacrapa merged 5 commits from task_24532 into master 2023-02-03 15:24:10 +01:00
18 changed files with 98 additions and 45 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</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>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -35,5 +35,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</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>

View File

@ -1,4 +1,4 @@
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
warSrcDirIsOutput=false

View File

@ -46,7 +46,11 @@
<wb-module deploy-name="geoportal-data-viewer-app-3.2.0-SNAPSHOT">
<wb-module deploy-name="geoportal-data-viewer-app-3.2.1-SNAPSHOT">
@ -121,6 +125,8 @@
@ -169,6 +175,8 @@
@ -217,6 +225,8 @@
@ -265,6 +275,8 @@
@ -287,6 +299,11 @@
<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>
@ -361,6 +378,8 @@
@ -409,6 +428,8 @@
@ -457,6 +478,8 @@

View File

@ -4,6 +4,13 @@
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).
## [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
#### Enhancements

View File

@ -14,7 +14,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>geoportal-data-viewer-app</artifactId>
<packaging>war</packaging>
<version>3.2.0</version>
<version>3.2.1-SNAPSHOT</version>
<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>

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.LayerItem;
import com.github.gwtbootstrap.client.ui.Modal;
import com.github.gwtbootstrap.client.ui.Popover;
import com.github.gwtbootstrap.client.ui.constants.Placement;
import com.google.gwt.core.client.EntryPoint;
@ -362,7 +363,7 @@ public class GeoportalDataViewer implements EntryPoint {
if (!ucdIds.contains(collId)) {
GWT.log("!! Collection " + collId + " is not available");
Window.alert("Collection " + collId + " is not found.");
Window.alert("Collection " + collId + " not found.");
} else {
GCubeCollection toOpen = theConfig.getAvailableCollections().get(collId);
@ -449,9 +450,22 @@ public class GeoportalDataViewer implements EntryPoint {
@Override
public void onFailure(Throwable caught) {
Window.alert(caught.getMessage());
// Window.alert(caught.getMessage());
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
@ -779,8 +793,9 @@ public class GeoportalDataViewer implements EntryPoint {
//console.log("jsonObj: "+jsonObj);
return jsonObj;
}-*/;
// /**
// * Handler popu closer.
// * Handler popup closer.
// *
// * @param divId the div id
// * @param overlayId the overlay id

View File

@ -159,7 +159,7 @@ public interface GeoportalDataViewerService extends RemoteService {
* @param limit the limit
* @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.

View File

@ -70,7 +70,7 @@ public interface GeoportalDataViewerServiceAsync {
void getInitialConfiguration(AsyncCallback<ViewerConfiguration> callback);
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);

View File

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

View File

@ -485,11 +485,6 @@ public abstract class OpenLayerMap {
wmsLayer.setSource(imageWMSSource);
wmsLayer.changed();
wmsLayer.changed();
//map.addLayer(wmsLayer);
}
/**
@ -647,7 +642,7 @@ public abstract class OpenLayerMap {
Style style = new Style();
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);
Stroke stroke = new Stroke(strokeOptions);
stroke.setWidth(2);

View File

@ -59,7 +59,10 @@ public interface GNAImages extends ClientBundle {
@Source("spinner_clock.gif")
ImageResource spinnerClock();
@Source("geoporta_error.png")
@Source("geoportal_error.png")
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)
return htmlCode;
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap();
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
if (firstEntrySet != null) {
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
}
@ -32,7 +32,7 @@ public class ProjectUtil {
if (document == null)
return htmlCode;
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap();
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
if (firstEntrySet != null) {
htmlCode += showkey ? firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>"
: firstEntrySet.getValue();
@ -51,7 +51,7 @@ public class ProjectUtil {
if (document == null)
return htmlCode;
Entry<String, String> firstEntrySet = document.getFirstEntryOfMap();
Entry<String, Object> firstEntrySet = document.getFirstEntryOfMap();
if (firstEntrySet != null) {
htmlCode += firstEntrySet.getKey() + ": <b>" + firstEntrySet.getValue() + "</b>";
}

View File

@ -121,7 +121,7 @@ public class ViewRelationshipPanel extends Composite {
firstProjectPanelContainer.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()
+ ")";

View File

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

View File

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

View File

@ -732,6 +732,16 @@ Table Of Contents (TOC)
}
.general_warning {
text-align: center;
font-size: 20px;
}
.general_warning div {
padding: 20px;
}
/******************************
RESPONSIVE
*******************************/