diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index 7cd43ed..8f2ad46 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -24,7 +24,7 @@
-

846

+

{{res3.total}}

software

diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index afda36d..91edb26 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -22,6 +22,7 @@ export class CommunityComponent { public res=[]; public res2=[]; + public res3=[]; constructor ( private route: ActivatedRoute, @@ -55,11 +56,18 @@ export class CommunityComponent { this.res = res; console.log(res); }); + this._communityService.getNumberOfResearchData().subscribe( res2 => { this.res2 = res2; console.log(res2); }); + + this._communityService.getNumberOfSoftware().subscribe( + res3 => { + this.res3 = res3; + console.log(res3); + }); } public ngOnDestroy() { if(this.piwiksub){ diff --git a/src/app/community/community.service.ts b/src/app/community/community.service.ts index 9913647..8300a88 100644 --- a/src/app/community/community.service.ts +++ b/src/app/community/community.service.ts @@ -18,4 +18,9 @@ export class CommunityService { return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/datasets/count?format=json&fq=communityid=egi') .map(res => res.json()).do(res => {console.log(res)}); } + + getNumberOfSoftware() { + return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/software/count?format=json&fq=communityid=egi') + .map(res => res.json()).do(res => {console.log(res)}); + } }