[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:
parent
bde482bd00
commit
326a590743
|
@ -34,9 +34,9 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||||
// console.log(data[1]);
|
// console.log(data[1]);
|
||||||
let dois = encodeURIComponent(this.results.map((result) => result.DOI).join(","));
|
let dois = encodeURIComponent(this.results.map((result) => result.DOI).join(","));
|
||||||
// console.log(dois);
|
// console.log(dois);
|
||||||
if(dois.length > 0 && this.showImpactFactors && this.properties.environment != "production") {
|
if(dois.length > 0 && this.showImpactFactors && this.properties.environment != "production" && (this.properties.impactFactorsAPIURL && this.properties.impactFactorsAPIURL.length > 0) ) {
|
||||||
let url = 'http://bip.imis.athena-innovation.gr:4000/paper/scores/batch/' + dois;
|
let url = this.properties.impactFactorsAPIURL + dois;
|
||||||
this.http.get(url).subscribe((data_received) => {
|
this.http.get((this.properties.useCache?(this.properties.cacheUrl+(encodeURIComponent(url))):url)).subscribe((data_received) => {
|
||||||
for (let i = 0; i < this.previewResults.length; i++) {
|
for (let i = 0; i < this.previewResults.length; i++) {
|
||||||
this.previewResults[i].pop_inf = new Array<string>();
|
this.previewResults[i].pop_inf = new Array<string>();
|
||||||
if (this.previewResults[i].DOI != '' && this.previewResults[i].DOI != null) {
|
if (this.previewResults[i].DOI != '' && this.previewResults[i].DOI != null) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export class EnvProperties {
|
||||||
statisticsFrameNewAPIURL;
|
statisticsFrameNewAPIURL;
|
||||||
useNewStatistisTool: boolean;
|
useNewStatistisTool: boolean;
|
||||||
statisticsAPIURL;
|
statisticsAPIURL;
|
||||||
|
impactFactorsAPIURL;
|
||||||
claimsAPIURL;
|
claimsAPIURL;
|
||||||
|
|
||||||
searchAPIURLLAst;
|
searchAPIURLLAst;
|
||||||
|
|
Loading…
Reference in New Issue