From 1410e13637bc0da163d2aef39d1605968cf470f8 Mon Sep 17 00:00:00 2001 From: "sofia.baltzi" Date: Mon, 29 Jan 2018 14:53:10 +0000 Subject: [PATCH] Add getNumberOfSoftware git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50457 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/community/community.component.html | 2 +- src/app/community/community.component.ts | 8 ++++++++ src/app/community/community.service.ts | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) 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 @@
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)}); + } }