Merge branch 'develop' of code-repo.d4science.org:MaDgIK/uoa-repository-manager-service into develop
This commit is contained in:
commit
bae9a132cb
|
@ -114,6 +114,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<List<BrowseEntry>>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
|
||||
|
@ -146,6 +147,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<EventsPage>() {}
|
||||
);
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
return resp.getBody();
|
||||
|
@ -195,6 +197,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<EventsPage>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
return resp.getBody();
|
||||
|
@ -219,6 +222,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<Map<String, List<SimpleSubscriptionDesc>>>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
return resp.getBody();
|
||||
|
@ -252,6 +256,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<Subscription>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
|
||||
|
@ -274,6 +279,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<Void>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
return new ResponseEntity<>("OK", HttpStatus.OK);
|
||||
|
@ -296,6 +302,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<Subscription>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
return resp.getBody();
|
||||
|
@ -325,6 +332,7 @@ public class BrokerServiceImpl implements BrokerService {
|
|||
new ParameterizedTypeReference<EventsPage>() {
|
||||
});
|
||||
} catch (RestClientException e) {
|
||||
logger.error(e.getMessage());
|
||||
throw new BrokerException(e);
|
||||
}
|
||||
return resp.getBody();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package eu.dnetlib.repo.manager.service;
|
||||
|
||||
import eu.dnetlib.enabling.datasources.common.AggregationInfo;
|
||||
import eu.dnetlib.repo.manager.domain.MetricsInfo;
|
||||
import eu.dnetlib.repo.manager.domain.MetricsNumbers;
|
||||
import eu.dnetlib.repo.manager.domain.RepositorySnippet;
|
||||
import eu.dnetlib.repo.manager.domain.RepositorySummaryInfo;
|
||||
import eu.dnetlib.repo.manager.domain.broker.BrowseEntry;
|
||||
|
@ -68,9 +68,9 @@ public class DashboardServiceImpl implements DashboardService {
|
|||
logger.warn("Could not find repo aggregations, after " + (end - start) + "ms!");
|
||||
|
||||
try {
|
||||
MetricsInfo metricsInfo = repositoryService.getMetricsInfoForRepository(repoId);
|
||||
repositorySummaryInfo.setTotalDownloads(metricsInfo.getMetricsNumbers().getTotalDownloads());
|
||||
repositorySummaryInfo.setTotalViews(metricsInfo.getMetricsNumbers().getTotalViews());
|
||||
MetricsNumbers metricsNumbers = repositoryService.getMetricsInfoForRepository(repoId).getMetricsNumbers();
|
||||
repositorySummaryInfo.setTotalDownloads(metricsNumbers.getTotalDownloads());
|
||||
repositorySummaryInfo.setTotalViews(metricsNumbers.getTotalViews());
|
||||
} catch (RepositoryServiceException e) {
|
||||
logger.error("Exception getting metrics info for repository: {}, {} ", repoId, repoOfficialName, e);
|
||||
}
|
||||
|
|
|
@ -773,12 +773,10 @@ public class RepositoryServiceImpl implements RepositoryService {
|
|||
@Override
|
||||
public MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException {
|
||||
try {
|
||||
|
||||
MetricsInfo metricsInfo = new MetricsInfo();
|
||||
metricsInfo.setDiagramsBaseURL(this.usageStatisticsDiagramsBaseURL);
|
||||
metricsInfo.setMetricsNumbers(getMetricsNumbers(getOpenAIREId(repoId)));
|
||||
return metricsInfo;
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while getting metrics info for repository: ", e);
|
||||
throw new RepositoryServiceException("General error", RepositoryServiceException.ErrorCode.GENERAL_ERROR);
|
||||
|
|
|
@ -14,10 +14,11 @@ spring:
|
|||
driverClassName: ${services.provide.db.driverClassName}
|
||||
|
||||
services:
|
||||
openaireServicesBaseUrl: https://beta.services.openaire.eu
|
||||
provide:
|
||||
dev-machine: 88.197.53.71 # VM-71
|
||||
aai:
|
||||
baseURL: https://aai.openaire.eu
|
||||
baseURL: https://beta.aai.openaire.eu
|
||||
oidc:
|
||||
domain: .openaire.eu # use empty value for local, otherwise: ".openaire.eu"
|
||||
id: XX
|
||||
|
@ -27,10 +28,10 @@ services:
|
|||
webURL: http://localhost:4200/join
|
||||
registry:
|
||||
coid: XX
|
||||
username: XX
|
||||
password: XX
|
||||
production: false
|
||||
url: ${services.provide.aai.baseURL}/registry/
|
||||
username: provide_openaire
|
||||
adminEmail: XX
|
||||
analyticsURL: https://analytics.openaire.eu/addsite.php?
|
||||
baseUrl: https://dev-openaire.d4science.org/openaire
|
||||
|
@ -41,9 +42,9 @@ services:
|
|||
url: https://beta.broker.openaire.eu
|
||||
clients:
|
||||
dsm: https://dev-openaire.d4science.org/openaire
|
||||
search: https://beta.services.openaire.eu/search/v2/api
|
||||
search: ${services.openaireServicesBaseUrl}/search/v2/api
|
||||
usageEvents: http://beta.lbs.openaire.eu:8080/ajax/summary
|
||||
usagestats: https://beta.services.openaire.eu/usagestats
|
||||
usagestats: ${services.openaireServicesBaseUrl}/usagestats
|
||||
db:
|
||||
driverClassName: org.postgresql.Driver
|
||||
password: dnetPwd
|
||||
|
@ -66,12 +67,12 @@ services:
|
|||
password: XX
|
||||
port: 6379
|
||||
topic_types:
|
||||
url: https://beta.services.openaire.eu/provision/mvc/vocabularies/dnet:topic_types.json
|
||||
url: ${services.openaireServicesBaseUrl}/provision/mvc/vocabularies/dnet:topic_types.json
|
||||
usageStatisticsDiagramsBaseURL: https://beta.openaire.eu/stats3/
|
||||
usageStatisticsNumbersBaseURL: https://beta.services.openaire.eu/usagestats/datasources/
|
||||
usageStatisticsNumbersBaseURL: ${services.openaireServicesBaseUrl}/usagestats/datasources/
|
||||
usagestats:
|
||||
adminEmail: XX
|
||||
sushiliteEndpoint: https://beta.services.openaire.eu/usagestats/sushilite/
|
||||
sushiliteEndpoint: ${services.openaireServicesBaseUrl}/usagestats/sushilite/
|
||||
validator:
|
||||
results:
|
||||
url: https://beta.provide.openaire.eu/compatibility/browseHistory/
|
||||
|
|
Loading…
Reference in New Issue