[Library|Trunk]

Impact factors:
	add url in property
	add cache
	if there is no property won't do the request


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58628 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-05-07 10:50:15 +00:00
parent bde482bd00
commit 326a590743
2 changed files with 4 additions and 4 deletions

View File

@ -34,9 +34,9 @@ export class SearchResultComponent implements OnInit, OnChanges {
// console.log(data[1]);
let dois = encodeURIComponent(this.results.map((result) => result.DOI).join(","));
// console.log(dois);
if(dois.length > 0 && this.showImpactFactors && this.properties.environment != "production") {
let url = 'http://bip.imis.athena-innovation.gr:4000/paper/scores/batch/' + dois;
this.http.get(url).subscribe((data_received) => {
if(dois.length > 0 && this.showImpactFactors && this.properties.environment != "production" && (this.properties.impactFactorsAPIURL && this.properties.impactFactorsAPIURL.length > 0) ) {
let url = this.properties.impactFactorsAPIURL + dois;
this.http.get((this.properties.useCache?(this.properties.cacheUrl+(encodeURIComponent(url))):url)).subscribe((data_received) => {
for (let i = 0; i < this.previewResults.length; i++) {
this.previewResults[i].pop_inf = new Array<string>();
if (this.previewResults[i].DOI != '' && this.previewResults[i].DOI != null) {

View File

@ -13,7 +13,7 @@ export class EnvProperties {
statisticsFrameNewAPIURL;
useNewStatistisTool: boolean;
statisticsAPIURL;
impactFactorsAPIURL;
claimsAPIURL;
searchAPIURLLAst;