[Trunk | Library]:
1. curator.service.ts: Use "useLongCache" property for curators. 2. helper.service.ts: Use "useLongCache" property for helptexts. 3. env-properties.ts: Add "useLongCache" property. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59073 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
9f569ac4c4
commit
0e26d955bc
|
@ -13,7 +13,7 @@ export class CuratorService {
|
||||||
|
|
||||||
public getCurators(properties: EnvProperties, emails: string): Observable<Curator[]> {
|
public getCurators(properties: EnvProperties, emails: string): Observable<Curator[]> {
|
||||||
let url: string = properties.adminToolsAPIURL + '/curator?emails='+emails;
|
let url: string = properties.adminToolsAPIURL + '/curator?emails='+emails;
|
||||||
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
return this.http.get<Curator[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateCurator(properties: EnvProperties, curator: Curator) {
|
public updateCurator(properties: EnvProperties, curator: Curator) {
|
||||||
|
@ -23,7 +23,7 @@ export class CuratorService {
|
||||||
|
|
||||||
public getCurator(properties: EnvProperties, curatorId: string): Observable<Curator> {
|
public getCurator(properties: EnvProperties, curatorId: string): Observable<Curator> {
|
||||||
let url: string = properties.adminToolsAPIURL + 'curator/'+curatorId;
|
let url: string = properties.adminToolsAPIURL + 'curator/'+curatorId;
|
||||||
return this.http.get<Curator>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
return this.http.get<Curator>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class HelperService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
||||||
//.map(res => <any> res.json());
|
//.map(res => <any> res.json());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ export class HelperService {
|
||||||
let page_route: string = router.split('?')[0].substring(0);
|
let page_route: string = router.split('?')[0].substring(0);
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += '/community/' + communityId + '/pagehelpcontent?active=true&page='+page_route;
|
url += '/community/' + communityId + '/pagehelpcontent?active=true&page='+page_route;
|
||||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDivHelpContents(properties:EnvProperties, communityId:string, router: string):any {
|
getDivHelpContents(properties:EnvProperties, communityId:string, router: string):any {
|
||||||
|
@ -46,7 +46,7 @@ export class HelperService {
|
||||||
let page_route: string = router.split('?')[0].substring(0);
|
let page_route: string = router.split('?')[0].substring(0);
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += '/community/' + communityId + '/divhelpcontent?active=true&page='+page_route;
|
url += '/community/' + communityId + '/divhelpcontent?active=true&page='+page_route;
|
||||||
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ export interface EnvProperties {
|
||||||
domain?: string;
|
domain?: string;
|
||||||
enablePiwikTrack?: boolean;
|
enablePiwikTrack?: boolean;
|
||||||
useCache?: boolean;
|
useCache?: boolean;
|
||||||
|
useLongCache?: boolean;
|
||||||
showAddThis?: boolean;
|
showAddThis?: boolean;
|
||||||
showContent?: boolean;
|
showContent?: boolean;
|
||||||
metricsAPIURL?: string;
|
metricsAPIURL?: string;
|
||||||
|
|
Loading…
Reference in New Issue