Compare commits

..

No commits in common. "master" and "v2.3.0" have entirely different histories.

4 changed files with 39 additions and 25 deletions

View File

@ -5,32 +5,27 @@ 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).
## [v2.3.1] - 2021-10-28
- Removed HomeLibrary
- Updated GWT version to latest
## [v2.3.0] - 2021-02-02 ## [v2.3.0] - 2021-02-02
- Ported to git Ported to git
- Feature #21008: UserStatistics portlet: Remove number of comments done and got indicator Feature #21008: UserStatistics portlet: Remove number of comments done and got indicator
## [v2.2.0] - 2017-02-20 ## [v2.2.0] - 2017-02-20"
- Added storage Quota information Added storage Quota information
## [v2.1.0] - 2016-10-02 ## [v2.1.0] - 2016-10-02
- Posts related to some statistics are now retrievable on the demand Posts related to some statistics are now retrievable on the demand
## [v2.0.0] - 2016-04-02 ## [v2.0.0] - 2016-04-02
- Ported to Liferay 6.2 Ported to Liferay 6.2
- Minor bug fix: long vre's name managed properly(Bug #2042) Minor bug fix: long vre's name managed properly(Bug #2042)
## [v1.0.0] - 2015-12-09 ## [v1.0.0] - 2015-12-09
- First release First release

View File

@ -38,6 +38,12 @@ open-source software toolkit used for building and operating Hybrid Data
Infrastructures enabling the dynamic deployment of Virtual Research Environments Infrastructures enabling the dynamic deployment of Virtual Research Environments
by favouring the realisation of reuse oriented policies. by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md) 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);

28
pom.xml
View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -14,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>user-statistics</artifactId> <artifactId>user-statistics</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>2.3.1</version> <version>2.3.0</version>
<name>User statistics portlet</name> <name>User statistics portlet</name>
<description> <description>
User statistics portlet shows main user's statistics. User statistics portlet shows main user's statistics.
@ -28,7 +27,7 @@
<properties> <properties>
<!-- Convenience property to set the GWT version --> <!-- Convenience property to set the GWT version -->
<gwtVersion>2.9.0</gwtVersion> <gwtVersion>2.8.2</gwtVersion>
<liferay.version>6.2.5</liferay.version> <liferay.version>6.2.5</liferay.version>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
@ -49,7 +48,7 @@
<dependency> <dependency>
<groupId>org.gcube.distribution</groupId> <groupId>org.gcube.distribution</groupId>
<artifactId>maven-portal-bom</artifactId> <artifactId>maven-portal-bom</artifactId>
<version>3.6.3</version> <version>3.6.0</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -119,11 +118,24 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>storagehub-client-library</artifactId> <artifactId>home-library-model</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.resources.discovery</groupId> <groupId>org.gcube.common</groupId>
<artifactId>ic-client</artifactId> <artifactId>home-library</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>asm-all</artifactId>
<groupId>asm</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library-jcr</artifactId>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.eliasbalasis</groupId> <groupId>net.eliasbalasis</groupId>

View File

@ -13,9 +13,10 @@ import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactory;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider; import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.homelibrary.home.HomeLibrary;
import org.gcube.common.homelibrary.home.workspace.Workspace;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.common.storagehub.client.dsl.StorageHubClient;
import org.gcube.portal.custom.communitymanager.SiteManagerUtil; import org.gcube.portal.custom.communitymanager.SiteManagerUtil;
import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl; import org.gcube.portal.databook.server.DBCassandraAstyanaxImpl;
import org.gcube.portal.databook.server.DatabookStore; import org.gcube.portal.databook.server.DatabookStore;
@ -144,8 +145,8 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
if(storageInUseLong == null){ if(storageInUseLong == null){
String userToken = PortalContext.getConfiguration().getCurrentUserToken(ScopeProvider.instance.get(), statisticsOfUsername); String userToken = PortalContext.getConfiguration().getCurrentUserToken(ScopeProvider.instance.get(), statisticsOfUsername);
SecurityTokenProvider.instance.set(userToken); SecurityTokenProvider.instance.set(userToken);
StorageHubClient shClient = new StorageHubClient(); Workspace workspace = HomeLibrary.getUserWorkspace(statisticsOfUsername);
storageInUseLong = shClient.getTotalVolume(); storageInUseLong = workspace.getDiskUsage();
cacheWorkspace.insert(statisticsOfUsername, storageInUseLong); cacheWorkspace.insert(statisticsOfUsername, storageInUseLong);
} }
storageInUse = ServerUtils.formatFileSize(storageInUseLong); storageInUse = ServerUtils.formatFileSize(storageInUseLong);