Adding job summary
This commit is contained in:
parent
ca5651e630
commit
dfcd57129f
|
@ -2,6 +2,7 @@ package eu.dnetlib.repo.manager.controllers;
|
||||||
|
|
||||||
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
||||||
import eu.dnetlib.domain.data.RepositoryInterface;
|
import eu.dnetlib.domain.data.RepositoryInterface;
|
||||||
|
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
|
||||||
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
||||||
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
||||||
import eu.dnetlib.repo.manager.service.EmailUtils;
|
import eu.dnetlib.repo.manager.service.EmailUtils;
|
||||||
|
@ -23,6 +24,8 @@ import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping(value = "/validator")
|
@RequestMapping(value = "/validator")
|
||||||
|
@ -105,6 +108,12 @@ public class ValidatorController {
|
||||||
return validatorService.getInterfaceInformation(baseUrl);
|
return validatorService.getInterfaceInformation(baseUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/validationSummary/{repoId}" , method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
@ResponseBody
|
||||||
|
public List<StoredJob> getInterfaceInformation(@PathVariable(value = "repoId") String repoId, @RequestParam(name = "size", defaultValue = "20") int size ) throws ValidatorServiceException, ResourceNotFoundException, JSONException {
|
||||||
|
return validatorService.getJobsSummary(repoId,size);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/complete" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
@RequestMapping(value = "/complete" , method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
@ -2,8 +2,10 @@ package eu.dnetlib.repo.manager.service;
|
||||||
|
|
||||||
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
||||||
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
||||||
|
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
|
||||||
import eu.dnetlib.domain.functionality.validator.RuleSet;
|
import eu.dnetlib.domain.functionality.validator.RuleSet;
|
||||||
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
||||||
|
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
||||||
import eu.dnetlib.repo.manager.shared.InterfaceInformation;
|
import eu.dnetlib.repo.manager.shared.InterfaceInformation;
|
||||||
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
|
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
|
@ -39,4 +41,6 @@ public interface ValidatorService {
|
||||||
int getStoredJobsTotalNumberNew(String user, String jobType, String validationStatus) throws ValidatorServiceException;
|
int getStoredJobsTotalNumberNew(String user, String jobType, String validationStatus) throws ValidatorServiceException;
|
||||||
|
|
||||||
InterfaceInformation getInterfaceInformation(String baseUrl) throws ValidationServiceException;
|
InterfaceInformation getInterfaceInformation(String baseUrl) throws ValidationServiceException;
|
||||||
|
|
||||||
|
List<StoredJob> getJobsSummary(String repoId, int limit) throws ValidatorServiceException, ResourceNotFoundException, JSONException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
package eu.dnetlib.repo.manager.service;
|
package eu.dnetlib.repo.manager.service;
|
||||||
|
|
||||||
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
||||||
|
import eu.dnetlib.domain.data.Repository;
|
||||||
|
import eu.dnetlib.domain.data.RepositoryInterface;
|
||||||
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
||||||
|
import eu.dnetlib.domain.functionality.validator.JobResultEntry;
|
||||||
import eu.dnetlib.domain.functionality.validator.RuleSet;
|
import eu.dnetlib.domain.functionality.validator.RuleSet;
|
||||||
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
||||||
|
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
||||||
import eu.dnetlib.repo.manager.shared.Constants;
|
import eu.dnetlib.repo.manager.shared.Constants;
|
||||||
import eu.dnetlib.repo.manager.shared.InterfaceInformation;
|
import eu.dnetlib.repo.manager.shared.InterfaceInformation;
|
||||||
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
|
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
|
||||||
import eu.dnetlib.repo.manager.utils.OaiTools;
|
import eu.dnetlib.repo.manager.utils.OaiTools;
|
||||||
import gr.uoa.di.driver.util.ServiceLocator;
|
import gr.uoa.di.driver.util.ServiceLocator;
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -18,14 +21,12 @@ import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@Service("validatorService")
|
@Service("validatorService")
|
||||||
|
@ -34,6 +35,9 @@ public class ValidatorServiceImpl implements ValidatorService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private MonitorServiceImpl monitorApi;
|
private MonitorServiceImpl monitorApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RepositoryService repositoryService;
|
||||||
|
|
||||||
@Resource(name = "validatorServiceLocator")
|
@Resource(name = "validatorServiceLocator")
|
||||||
private ServiceLocator<eu.dnetlib.api.functionality.ValidatorService> validatorServiceLocator;
|
private ServiceLocator<eu.dnetlib.api.functionality.ValidatorService> validatorServiceLocator;
|
||||||
|
|
||||||
|
@ -220,5 +224,10 @@ public class ValidatorServiceImpl implements ValidatorService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StoredJob> getJobsSummary(String repoId, int limit) throws JSONException, ValidatorServiceException {
|
||||||
|
return getValidationService().getJobSummary(repositoryService.getRepositoryInterface(repoId).stream().map(RepositoryInterface::getBaseUrl).collect(Collectors.toList()),limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
<value>classpath*:/application.properties</value>
|
<value>classpath*:/application.properties</value>
|
||||||
<value>classpath*:email-texts.properties</value>
|
<value>classpath*:email-texts.properties</value>
|
||||||
|
|
||||||
<value>classpath*:dnet-site-wizard.properties</value>
|
<!-- <value>classpath*:dnet-site-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-site-override.properties</value>
|
<!-- <value>classpath*:dnet-site-override.properties</value>-->
|
||||||
<value>classpath*:dnet-wizard.properties</value>
|
<!-- <value>classpath*:dnet-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-override.properties</value>
|
<!-- <value>classpath*:dnet-override.properties</value>-->
|
||||||
<value>classpath*:dnet-validator-wizard.properties</value>
|
<!-- <value>classpath*:dnet-validator-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-validator-override.properties</value>
|
<!-- <value>classpath*:dnet-validator-override.properties</value>-->
|
||||||
<value>classpath*:dnet-site-force-override.properties</value>
|
<!-- <value>classpath*:dnet-site-force-override.properties</value>-->
|
||||||
<value>classpath*:dnet-force-override.properties</value>
|
<!-- <value>classpath*:dnet-force-override.properties</value>-->
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
infrastructure.name=integration
|
infrastructure.name=integration
|
||||||
|
|
||||||
## Container properties
|
## Container properties
|
||||||
container.hostname=localhost
|
container.hostname=estella.athenarc.gr
|
||||||
container.context=uoa-repository-manager-service
|
container.context=uoa-repository-manager-service
|
||||||
container.port = 8480
|
container.port=8480
|
||||||
|
|
||||||
IS.url = https://dev-openaire.d4science.org/is/services
|
IS.url = https://dev-openaire.d4science.org/is/services
|
||||||
ISLookUpService.url = ${IS.url}/isLookUp
|
ISLookUpService.url = ${IS.url}/isLookUp
|
||||||
ISRegistryService.url = ${IS.url}/isRegistry
|
ISRegistryService.url = ${IS.url}/isRegistry
|
||||||
ISSNService.url = ${IS.url}/services/isSN
|
ISSNService.url = ${IS.url}/services/isSN
|
||||||
|
|
||||||
ValidatorService.url=http://localhost:8080/validator-service/services/validatorWebService
|
#ValidatorService.url=http://88.197.53.69:8080/validator-service/services/validatorWebService
|
||||||
#ValidatorService.url=http://beta.services.openaire.eu/validator-service/services/validatorWebService
|
#ValidatorService.url=http://beta.services.openaire.eu/validator-service/services/validatorWebService
|
||||||
#ValidatorService.url=http://88.197.53.69:8080/validator-service/
|
ValidatorService.url=http://localhost:8080/validator-service/services/validatorWebService
|
||||||
|
|
||||||
services.provide.adminEmail=provide-admin@openaire.eu
|
services.provide.adminEmail=provide-admin@openaire.eu
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ services.repo-manager.baseUrl = http://${container.hostname}:${container.port}/$
|
||||||
transport.soap.baseAddress = http://${container.hostname}:${container.port}/${container.context}
|
transport.soap.baseAddress = http://${container.hostname}:${container.port}/${container.context}
|
||||||
transport.soap.force.local.address = false
|
transport.soap.force.local.address = false
|
||||||
|
|
||||||
|
|
||||||
|
validator.results.url=https://${container.hostname}:${container.port}/compatibility/browseHistory/
|
||||||
services.repo-manager.adminEmail = antleb@di.uoa.gr
|
services.repo-manager.adminEmail = antleb@di.uoa.gr
|
||||||
services.repo-manager.repository.testing.mode = false
|
services.repo-manager.repository.testing.mode = false
|
||||||
services.repo-manager.deploy.environment = development
|
services.repo-manager.deploy.environment = development
|
||||||
|
@ -68,20 +70,11 @@ webapp.dev.front = http://localhost:4200/landing
|
||||||
|
|
||||||
##REDIS-AAI
|
##REDIS-AAI
|
||||||
|
|
||||||
redis.host=vereniki.athenarc.gr
|
redis.host=estella.athenarc.gr
|
||||||
redis.port=6379
|
redis.port=6379
|
||||||
redis.password=redis01041992s
|
redis.password=redis123
|
||||||
aai.mode=develop
|
aai.mode=develop
|
||||||
|
|
||||||
#redis.host = aleka.athenarc.gr
|
|
||||||
#redis.port = 6379
|
|
||||||
#redis.password =
|
|
||||||
#aai.mode = develop
|
|
||||||
|
|
||||||
#redis.host=localhost
|
|
||||||
#redis.port=6379
|
|
||||||
#redis.password=
|
|
||||||
#aai.mode=develop
|
|
||||||
|
|
||||||
services.repomanager.usageStatisticsDiagramsBaseURL = https://beta.openaire.eu/stats3/
|
services.repomanager.usageStatisticsDiagramsBaseURL = https://beta.openaire.eu/stats3/
|
||||||
services.repomanager.usageStatisticsNumbersBaseURL = https://beta.services.openaire.eu/usagestats/datasources/
|
services.repomanager.usageStatisticsNumbersBaseURL = https://beta.services.openaire.eu/usagestats/datasources/
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
<value>classpath*:/application.properties</value>
|
<value>classpath*:/application.properties</value>
|
||||||
<value>classpath*:/email-texts.properties</value>
|
<value>classpath*:/email-texts.properties</value>
|
||||||
|
|
||||||
<value>classpath*:dnet-site-wizard.properties</value>
|
<!-- <value>classpath*:dnet-site-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-site-override.properties</value>
|
<!-- <value>classpath*:dnet-site-override.properties</value>-->
|
||||||
<value>classpath*:dnet-wizard.properties</value>
|
<!-- <value>classpath*:dnet-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-override-new.properties</value>
|
<!-- <value>classpath*:dnet-override-new.properties</value>-->
|
||||||
<value>classpath*:dnet-validator-wizard.properties</value>
|
<!-- <value>classpath*:dnet-validator-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-validator-override.properties</value>
|
<!-- <value>classpath*:dnet-validator-override.properties</value>-->
|
||||||
<value>classpath*:dnet-site-force-override.properties</value>
|
<!-- <value>classpath*:dnet-site-force-override.properties</value>-->
|
||||||
<value>classpath*:dnet-force-override.properties</value>
|
<!-- <value>classpath*:dnet-force-override.properties</value>-->
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
|
@ -55,14 +55,14 @@
|
||||||
<value>classpath*:/application.properties</value>
|
<value>classpath*:/application.properties</value>
|
||||||
<value>classpath*:/email-texts.properties</value>
|
<value>classpath*:/email-texts.properties</value>
|
||||||
|
|
||||||
<value>classpath*:dnet-site-wizard.properties</value>
|
<!-- <value>classpath*:dnet-site-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-site-override.properties</value>
|
<!-- <value>classpath*:dnet-site-override.properties</value>-->
|
||||||
<value>classpath*:dnet-wizard.properties</value>
|
<!-- <value>classpath*:dnet-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-override-new.properties</value>
|
<!-- <value>classpath*:dnet-override-new.properties</value>-->
|
||||||
<value>classpath*:dnet-validator-wizard.properties</value>
|
<!-- <value>classpath*:dnet-validator-wizard.properties</value>-->
|
||||||
<value>classpath*:dnet-validator-override.properties</value>
|
<!-- <value>classpath*:dnet-validator-override.properties</value>-->
|
||||||
<value>classpath*:dnet-site-force-override.properties</value>
|
<!-- <value>classpath*:dnet-site-force-override.properties</value>-->
|
||||||
<value>classpath*:dnet-force-override.properties</value>
|
<!-- <value>classpath*:dnet-force-override.properties</value>-->
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
Loading…
Reference in New Issue