ref 19213: Reinforce the information in the Service Profile tab

https://support.d4science.org/issues/19213

Updated to include new service info
master
Giancarlo Panichi 3 years ago
parent 7a030fe238
commit 4b0334d64c

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/data-miner-manager-cl-1.8.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/data-miner-manager-cl-1.8.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/data-miner-manager-cl-1.8.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-cl-1.8.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -33,5 +33,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/data-miner-manager-cl-1.8.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/data-miner-manager-cl-1.8.1-SNAPSHOT/WEB-INF/classes"/>
</classpath>

1
.gitignore vendored

@ -1 +1,2 @@
/target/
/test.log

@ -0,0 +1,96 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# Changelog for "data-miner-manager-cl"
## [v1.9.0-SNAPSHOT] - 2021-10-06
### Features
- Added cluster description in Service Info [#19213]
## [v1.8.0] - 2019-10-01
### Features
- Added service info [#12594]
- Added support to show log information [#11711]
- Added support to show files html, json, pdf, txt [#17106]
- Updated information show to the user when a computation is submitted [#17030]
- Added Item Id support [#16503]
- Updated ComputationId to support token in process url [#17030]
## [v1.7.0] - 2019-04-01
### Features
- Added location and zoom support [#11708]
- Added coordinates EPSG:4326 and EPSG:3857 support [#11710]
## [v1.6.0] - 2019-01-31
### Features
- Updated to support get operator by id with refresh
## [v1.5.0] - 2018-10-01
### Features
- Updated to support StorageHub[#11720]
## [v1.4.0] - 2018-06-01
### Features
- Updated to support netcdf files
- Added support for operators refresh[#11741]
## [v1.3.0] - 2017-06-12
### Features
- Support Java 8 compatibility [#8471]
## [v1.2.0] - 2017-05-01
### Features
- Updated to support DataMinerManagerWidget [#6078]
- Fixed load balancing [#7576]
## [v1.1.0] - 2017-03-20
### Features
- Updated Monitor interface
- Added encoded parameters in equivalent http request [#7167]
## [v1.0.0] - 2017-02-14
### Features
- first release

@ -0,0 +1,26 @@
# Acknowledgments
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
- the Seventh Framework Programme for research, technological development and demonstration
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
- the H2020 research and innovation programme
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);

@ -34,12 +34,4 @@ open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- DILIGENT (grant no. 004260);
- the Seventh Framework Programme for research, technological development and demonstration
- D4Science (grant no. 212488), D4Science-II (grant no.239019), ENVRI (grant no. 283465), EUBrazilOpenBio (grant no. 288754), iMarine(grant no. 283644);
- the H2020 research and innovation programme
- BlueBRIDGE (grant no. 675680), EGIEngage (grant no. 654142), ENVRIplus (grant no. 654182), Parthenos (grant no. 654119), SoBigData (grant no. 654024),DESIRA (grant no. 818194), ARIADNEplus (grant no. 823914), RISIS2 (grant no. 824091), PerformFish (grant no. 727610), AGINFRAplus (grant no. 731001);
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md)

@ -1,47 +1,43 @@
<ReleaseNotes>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-8-1" date="2019-10-01">
<Change>Upated to Git and Jenkins</Change>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-9-0" date="2021-10-06">
<Change>Added cluster description in Service Info [#19213]</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-8-0" date="2019-10-01">
<Change>Added service info [ticket #12594]</Change>
<Change>Added support to show log information [ticket #11711]</Change>
<Change>Added support to show files html, json, pdf, txt [ticket
#17106]</Change>
<Change>Added service info [#12594]</Change>
<Change>Added support to show log information [#11711]</Change>
<Change>Added support to show files html, json, pdf, txt [#17106]</Change>
<Change>Updated information show to the user when a computation is
submitted [ticket #17030]</Change>
<Change>Added Item Id support [ticket #16503]</Change>
<Change>Updated ComputationId to support token in process url [ticket
#17030]
submitted [#17030]</Change>
<Change>Added Item Id support [#16503]</Change>
<Change>Updated ComputationId to support token in process url [#17030]
</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-7-0" date="2019-04-01">
<Change>Added location and zoom support [ticket #11708]</Change>
<Change>Added coordinates EPSG:4326 and EPSG:3857 support [ticket
#11710]
<Change>Added location and zoom support [#11708]</Change>
<Change>Added coordinates EPSG:4326 and EPSG:3857 support [#11710]
</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-6-0" date="2019-01-31">
<Change>Updated to support get operator by id with refresh</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-5-0" date="2018-10-01">
<Change>Updated to support StorageHub[ticket #11720]</Change>
<Change>Updated to support StorageHub[#11720]</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-4-0" date="2018-06-01">
<Change>Updated to support netcdf files</Change>
<Change>Added support for operators refresh[ticket #11741]</Change>
<Change>Added support for operators refresh[#11741]</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-3-0" date="2017-06-12">
<Change>Support Java 8 compatibility [ticket #8471]</Change>
<Change>Support Java 8 compatibility [#8471]</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-2-0" date="2017-05-01">
<Change>Updated to support DataMinerManagerWidget [ticket #6078]
<Change>Updated to support DataMinerManagerWidget [#6078]
</Change>
<Change>Fixed load balancing [ticket #7576]</Change>
<Change>Fixed load balancing [#7576]</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-1-0" date="2017-03-20">
<Change>Updated Monitor interface</Change>
<Change>Added encoded parameters in equivalent http request [ticket
#7167]
<Change>Added encoded parameters in equivalent http request [#7167]
</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-0-0" date="2017-02-14">

@ -14,7 +14,8 @@
<includes>
<include>README.md</include>
<include>LICENSE.md</include>
<include>changelog.xml</include>
<include>FUNDING.md</include>
<include>CHANGELOG.md</include>
<include>profile.xml</include>
</includes>
<fileMode>755</fileMode>

@ -11,7 +11,7 @@
<groupId>org.gcube.data.analysis</groupId>
<artifactId>data-miner-manager-cl</artifactId>
<version>1.8.1-SNAPSHOT</version>
<version>1.9.0-SNAPSHOT</version>
<name>data-miner-manager-cl</name>
<description>DataMiner Manager Client Library</description>
@ -150,11 +150,11 @@
<dependency>
<groupId>org.n52.wps</groupId>
<artifactId>52n-wps-client-lib</artifactId>
<version>[3.3.1,3.3.3)</version>
<version>3.6.1</version>
<exclusions>
<exclusion>
<artifactId>gt-opengis</artifactId>
<groupId>org.geotools</groupId>
<artifactId>gt-opengis</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
@ -164,7 +164,6 @@
</dependency>
<!-- LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
@ -192,11 +191,24 @@
<repositories>
<repository>
<id>gCubeExternal</id>
<name>gcube-externals</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals/</url>
<id>Apache</id>
<name>Apache repository</name>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>geotools</id>
<name>Geotools</name>
<url>https://repo.osgeo.org/repository/release/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>n52-releases</id>
<name>52n Releases</name>
@ -209,6 +221,34 @@
</snapshots>
</repository>
<!--
<repository>
<id>OpenGEO</id>
<name>opengeo repository</name>
<url>https://repo.boundlessgeo.com</url>
</repository> -->
<repository>
<id>geosolutions</id>
<name>geosolution repository</name>
<url>https://maven.geo-solutions.it/</url>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
<!--
<repository>
<id>gCubeExternal</id>
<name>gcube-externals</name>
<url>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals/</url>
</repository> -->
</repositories>
<dependencyManagement>
@ -216,14 +256,13 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>1.4.0</version>
<version>2.0.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
@ -271,6 +310,7 @@
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>

@ -25,7 +25,6 @@ import org.slf4j.LoggerFactory;
*/
public class InformationSystemUtils {
private static Logger logger = LoggerFactory.getLogger(InformationSystemUtils.class);
public static String retrieveServiceAddress(String category, String name, String scope) throws Exception {
@ -70,16 +69,15 @@ public class InformationSystemUtils {
}
}
public static ServiceInfo retrieveServiceInfo(String category, String name, String scope)
throws Exception {
public static ServiceInfo retrieveServiceInfo(String category, String name, String scope) throws Exception {
try {
logger.debug("Retrieve Service Properties");
if (scope == null || scope.length() == 0){
logger.error("Invalid request scope: "+scope);
logger.debug("Retrieve DataMiner Service Properties");
if (scope == null || scope.length() == 0) {
logger.error("Invalid request scope: " + scope);
return null;
}
ScopeProvider.instance.set(scope);
SimpleQuery query = ICFactory.queryFor(ServiceEndpoint.class);
@ -88,44 +86,59 @@ public class InformationSystemUtils {
.setResult("$resource/Profile/AccessPoint");
DiscoveryClient<AccessPoint> client = ICFactory.clientFor(AccessPoint.class);
List<AccessPoint> accessPointList = client.submit(query);
String serviceAddress=null;
String serviceAddress = null;
ArrayList<ServiceInfoData> serviceProperties = new ArrayList<>();
if (accessPointList != null && !accessPointList.isEmpty()) {
AccessPoint accessPoint = accessPointList.get(0);
if (accessPoint.address() != null && !accessPoint.address().isEmpty()) {
String accessPointAddress = accessPoint.address();
int wpsWebProcessingServiceIndex = accessPointAddress.indexOf(Constants.WPSWebProcessingService);
if (wpsWebProcessingServiceIndex > 0) {
serviceAddress = accessPointAddress.substring(0, wpsWebProcessingServiceIndex);
}
}
if (accessPoint.properties() != null && !accessPoint.propertyMap().isEmpty()) {
for (String key : accessPoint.propertyMap().keySet()) {
Property property = accessPoint.propertyMap().get(key);
if (property != null&&property.name() != null && !property.name().isEmpty()){
if(property.name().contains(":")) {
String[] propertyWithCategory=property.name().split(":");
if(propertyWithCategory.length>=2){
serviceProperties.add(new ServiceInfoData(propertyWithCategory[1],property.value(),propertyWithCategory[0]));
} else {
serviceProperties.add(new ServiceInfoData(property.name(), property.value(), Constants.DATA_MINER_DEFAULT_SERVICE_INFO_CATEGORY));
if (accessPointList != null && !accessPointList.isEmpty()) {
for (int i = 0; i < accessPointList.size(); i++) {
AccessPoint accessPoint = accessPointList.get(i);
if (accessPoint != null) {
if (i == 0) {
if (accessPoint.address() != null && !accessPoint.address().isEmpty()) {
String accessPointAddress = accessPoint.address();
int wpsWebProcessingServiceIndex = accessPointAddress
.indexOf(Constants.WPSWebProcessingService);
if (wpsWebProcessingServiceIndex > 0) {
serviceAddress = accessPointAddress.substring(0, wpsWebProcessingServiceIndex);
}
} else {
serviceProperties.add(new ServiceInfoData(property.name(), property.value(), Constants.DATA_MINER_DEFAULT_SERVICE_INFO_CATEGORY));
}
}
}
String categoryDescription;
if (accessPoint.description() == null && accessPoint.description().isEmpty()) {
categoryDescription = Constants.DATA_MINER_DEFAULT_SERVICE_INFO_CATEGORY;
} else {
categoryDescription = accessPoint.description();
}
if (accessPoint.properties() != null && !accessPoint.propertyMap().isEmpty()) {
for (String key : accessPoint.propertyMap().keySet()) {
Property property = accessPoint.propertyMap().get(key);
if (property != null && property.name() != null && !property.name().isEmpty()) {
if (property.name().contains(":")) {
String[] propertyWithCategory = property.name().split(":");
if (propertyWithCategory.length >= 2) {
serviceProperties.add(new ServiceInfoData(propertyWithCategory[1],
property.value(), propertyWithCategory[0]));
} else {
serviceProperties.add(new ServiceInfoData(property.name(), property.value(),
categoryDescription));
}
} else {
serviceProperties.add(new ServiceInfoData(property.name(), property.value(),
categoryDescription));
}
}
}
}
}
}
}
ServiceInfo serviceInfo=new ServiceInfo(serviceAddress,serviceProperties);
ServiceInfo serviceInfo = new ServiceInfo(serviceAddress, serviceProperties);
logger.debug("Service Info: " + serviceInfo);
logger.debug("DataMiner Service Info: " + serviceInfo);
return serviceInfo;
} catch (Throwable e) {

Loading…
Cancel
Save