Revision 45390
Added by Konstantina Galouni over 7 years ago
project.service.ts | ||
---|---|---|
36 | 36 |
|
37 | 37 |
} |
38 | 38 |
|
39 |
getMetrics (id: string):any { |
|
40 |
console.info("getProjectsMetrics in service"); |
|
41 |
//let url = OpenaireProperties. getSearchAPIURLLast() + 'publications/' +id+"?format=json"; |
|
42 |
let url = OpenaireProperties.getMetricsAPIURL()+"projects/"+id+"/clicks"; |
|
43 |
let key = url; |
|
44 |
if (this._cache.has(key)) { |
|
45 |
return Observable.of(this._cache.get(key)); |
|
46 |
} |
|
47 |
return this.http.get(url) |
|
48 |
.map(res => <any> res.json()) |
|
49 |
.map(res => res['views']) |
|
50 |
.do(res => { |
|
51 |
this._cache.set(key, res); |
|
52 |
}); |
|
53 |
} |
|
54 |
|
|
55 | 39 |
/* |
56 | 40 |
get project strtDate and endDate |
57 | 41 |
*/ |
Also available in: Unified diff
use of uikit classes | tabs are not responsive in landing pages | metrics tab in landing pages updated (new component+service, removed from organization landing page)