Change total function in community service and component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50966 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
803dd44a68
commit
f85c536b8a
|
@ -71,17 +71,17 @@ export class CommunityComponent {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this._communityService.getNumberOfPublications().subscribe(
|
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications/count?format=json&fq=communityid=egi').subscribe(
|
||||||
publicationTotal => {
|
publicationTotal => {
|
||||||
this.publicationTotal = publicationTotal;
|
this.publicationTotal = publicationTotal;
|
||||||
});
|
});
|
||||||
|
|
||||||
this._communityService.getNumberOfResearchData().subscribe(
|
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets/count?format=json&fq=communityid=egi').subscribe(
|
||||||
researchDataTotal => {
|
researchDataTotal => {
|
||||||
this.researchDataTotal = researchDataTotal;
|
this.researchDataTotal = researchDataTotal;
|
||||||
});
|
});
|
||||||
|
|
||||||
this._communityService.getNumberOfSoftware().subscribe(
|
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/software/count?format=json&fq=communityid=egi').subscribe(
|
||||||
softwareTotal => {
|
softwareTotal => {
|
||||||
this.softwareTotal = softwareTotal;
|
this.softwareTotal = softwareTotal;
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,19 +13,9 @@ export class CommunityService {
|
||||||
constructor(private http:Http) {
|
constructor(private http:Http) {
|
||||||
}
|
}
|
||||||
|
|
||||||
getNumberOfPublications() {
|
getTotal(url: string) {
|
||||||
return this.http.get('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications/count?format=json&fq=communityid=egi')
|
return this.http.get(url)
|
||||||
.map(res => <any> res.json()).map(res => res.total).do(res => {console.log(res)});
|
.map(res => <any> res.json()).map(res => res.total).do(res => {console.log(res)});
|
||||||
}
|
|
||||||
|
|
||||||
getNumberOfResearchData() {
|
|
||||||
return this.http.get('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets/count?format=json&fq=communityid=egi')
|
|
||||||
.map(res => <any> res.json()).map(res => res.total).do(res => {console.log(res)});
|
|
||||||
}
|
|
||||||
|
|
||||||
getNumberOfSoftware() {
|
|
||||||
return this.http.get('http://beta.services.openaire.eu:8480/search/rest/v2/api/software/count?format=json&fq=communityid=egi')
|
|
||||||
.map(res => <any> res.json()).map(res => res.total).do(res => {console.log(res)});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getResults(url: string) {
|
getResults(url: string) {
|
||||||
|
|
Loading…
Reference in New Issue