Showing basic statistics (i.e. "X project published") via
'countByPhase'method [#25598]
This commit is contained in:
parent
5cef21b4f0
commit
3099a31e32
|
@ -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/geoportal-data-viewer-app-3.6.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/geoportal-data-viewer-app-3.6.0/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"/>
|
||||||
|
@ -30,5 +30,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.6.0-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/geoportal-data-viewer-app-3.6.0/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -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.6.0-SNAPSHOT
|
lastWarOutDir=/home/francescomangiacrapa/git/geoportal-data-viewer-app/target/geoportal-data-viewer-app-3.6.0
|
||||||
warSrcDir=src/main/webapp
|
warSrcDir=src/main/webapp
|
||||||
warSrcDirIsOutput=false
|
warSrcDirIsOutput=false
|
||||||
|
|
|
@ -90,7 +90,19 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wb-module deploy-name="geoportal-data-viewer-app-3.6.0-SNAPSHOT">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<wb-module deploy-name="geoportal-data-viewer-app-3.6.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -253,6 +265,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -345,6 +363,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -437,6 +461,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -459,6 +489,15 @@
|
||||||
|
|
||||||
|
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<dependent-module archiveName="geoportal-data-common-2.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-data-common/geoportal-data-common">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -621,6 +660,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -713,6 +758,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -805,6 +856,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
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.6.0]
|
## [v3.6.0-SNAPSHOT]
|
||||||
|
|
||||||
- GUI optimization [#25461]
|
- GUI optimization [#25461]
|
||||||
- Using the latest libraries version: gwt-ol.v8.4.1 (with openlayers.v6.6.1) and gwt.v2.10
|
- Using the latest libraries version: gwt-ol.v8.4.1 (with openlayers.v6.6.1) and gwt.v2.10
|
||||||
|
- Showing basic statistics (i.e. "X project published") via 'countByPhase' method [#25598]
|
||||||
|
|
||||||
## [v3.5.0]
|
## [v3.5.0]
|
||||||
|
|
||||||
|
|
|
@ -227,4 +227,6 @@ public interface GeoportalDataViewerService extends RemoteService {
|
||||||
*/
|
*/
|
||||||
String getHTTPResponseForURL(String url);
|
String getHTTPResponseForURL(String url);
|
||||||
|
|
||||||
|
Integer getCountFor(String profileID, String phase, String status);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,4 +91,6 @@ public interface GeoportalDataViewerServiceAsync {
|
||||||
|
|
||||||
void getHTTPResponseForURL(String url, AsyncCallback<String> callback);
|
void getHTTPResponseForURL(String url, AsyncCallback<String> callback);
|
||||||
|
|
||||||
|
void getCountFor(String profileID, String phase, String status, AsyncCallback<Integer> callback);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,9 @@ public class LayerCollectionPanel extends Composite {
|
||||||
@UiField
|
@UiField
|
||||||
HTMLPanel styleListPanel;
|
HTMLPanel styleListPanel;
|
||||||
|
|
||||||
|
@UiField
|
||||||
|
HTMLPanel statisticPanel;
|
||||||
|
|
||||||
@UiField
|
@UiField
|
||||||
Button buttonLegend;
|
Button buttonLegend;
|
||||||
|
|
||||||
|
@ -109,6 +112,7 @@ public class LayerCollectionPanel extends Composite {
|
||||||
|
|
||||||
buttonLegend.setType(ButtonType.LINK);
|
buttonLegend.setType(ButtonType.LINK);
|
||||||
legendPanel.setVisible(false);
|
legendPanel.setVisible(false);
|
||||||
|
statisticPanel.setVisible(false);
|
||||||
|
|
||||||
GWT.log("Found available collection " + coll);
|
GWT.log("Found available collection " + coll);
|
||||||
String label = coll.getUcd().getName();
|
String label = coll.getUcd().getName();
|
||||||
|
@ -140,6 +144,31 @@ public class LayerCollectionPanel extends Composite {
|
||||||
|
|
||||||
basePanel.add(checkbox);
|
basePanel.add(checkbox);
|
||||||
|
|
||||||
|
GeoportalDataViewerServiceAsync.Util.getInstance().getCountFor(collectionID, "Published", "OK", new AsyncCallback<Integer>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(Integer result) {
|
||||||
|
|
||||||
|
if(result!=null) {
|
||||||
|
String resultLabel = result+" project";
|
||||||
|
if(result>1) {
|
||||||
|
resultLabel+="s";
|
||||||
|
}
|
||||||
|
resultLabel+= " published";
|
||||||
|
statisticPanel.setVisible(true);
|
||||||
|
statisticPanel.add(new HTML(resultLabel));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
ViewerConfiguration theConfig = GeoportalDataViewer.getStatus().getViewerConfig();
|
ViewerConfiguration theConfig = GeoportalDataViewer.getStatus().getViewerConfig();
|
||||||
final GCubeCollection toOpen = theConfig.getAvailableCollections().get(collectionID);
|
final GCubeCollection toOpen = theConfig.getAvailableCollections().get(collectionID);
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
<g:HTMLPanel>
|
<g:HTMLPanel>
|
||||||
<g:HTMLPanel ui:field="basePanel">
|
<g:HTMLPanel ui:field="basePanel">
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
|
<g:HTMLPanel ui:field="statisticPanel" addStyleNames="statistic-style-panel">
|
||||||
|
</g:HTMLPanel>
|
||||||
<g:HTMLPanel ui:field="stylePanel" visible="false" addStyleNames="layer-style-panel">
|
<g:HTMLPanel ui:field="stylePanel" visible="false" addStyleNames="layer-style-panel">
|
||||||
Layer Style
|
Layer Style
|
||||||
<g:HorizontalPanel>
|
<g:HorizontalPanel>
|
||||||
|
|
|
@ -290,8 +290,8 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
||||||
? new ZAxis(layerZAxis.getUnits(), layerZAxis.isPositive(), layerZAxis.getValues())
|
? new ZAxis(layerZAxis.getUnits(), layerZAxis.isPositive(), layerZAxis.getValues())
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return new GeoInformationForWMSRequest(wmsServiceServiceEndpoint, validWMSRequest, layerName, versionWms, crs,
|
return new GeoInformationForWMSRequest(wmsServiceServiceEndpoint, validWMSRequest, layerName, versionWms,
|
||||||
mapWmsNotStandard, styles, styles.isNcWms(), zAxis);
|
crs, mapWmsNotStandard, styles, styles.isNcWms(), zAxis);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String msg = "An error occurred during wms request validation for layer: " + layerName;
|
String msg = "An error occurred during wms request validation for layer: " + layerName;
|
||||||
LOG.error(msg, e);
|
LOG.error(msg, e);
|
||||||
|
@ -1863,4 +1863,19 @@ public class GeoportalDataViewerServiceImpl extends RemoteServiceServlet impleme
|
||||||
return HTTPRequestUtil.getResponse(url);
|
return HTTPRequestUtil.getResponse(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getCountFor(String profileID, String phase, String status) {
|
||||||
|
LOG.debug("getCountFor profileID: " + profileID + ", phase: " + phase + ", status: " + status + "called");
|
||||||
|
Integer integer = null;
|
||||||
|
try {
|
||||||
|
new GeoportalServiceIdentityProxy(this.getThreadLocalRequest());
|
||||||
|
integer = GeoportalClientCaller.projects().getCountByPhaseFor(profileID, phase, status);
|
||||||
|
LOG.info("getCountFor profileID: " + profileID + ", phase: " + phase + ", status: " + status
|
||||||
|
+ " returning: " + integer);
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.error("Error occurred in getCountFor for profileID: " + profileID, e);
|
||||||
|
}
|
||||||
|
return integer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -776,6 +776,13 @@ Table Of Contents (TOC)
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.statistic-style-panel {
|
||||||
|
margin-left: 25px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: gray;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.layer-style-panel-table-legend table td {
|
.layer-style-panel-table-legend table td {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue