diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts
index 181225f..6afff5b 100644
--- a/src/app/community/community.component.ts
+++ b/src/app/community/community.component.ts
@@ -9,6 +9,7 @@ import { ErrorCodes, RouterHelper, PiwikService} from 'ng-openaire-library';
import {Properties} from '../utils/properties';
import {CommunityService} from "./community.service";
+//import { PublicationInfo } from '../../publicationInfo';
@Component({
selector: 'community',
@@ -24,6 +25,10 @@ export class CommunityComponent {
public reasearchData=[];
public software=[];
public publicationsInfo=[];
+ public researchDataInfo=[];
+ public softwareInfo=[];
+
+ //public publicationsInfo: PublicationInfo[] = [];
constructor (
private route: ActivatedRoute,
@@ -75,6 +80,24 @@ export class CommunityComponent {
this.publicationsInfo = publicationsInfo;
console.log(publicationsInfo);
});
+
+ this._communityService.getResearchDataInfo().subscribe(
+ researchDataInfo => {
+ this.researchDataInfo = researchDataInfo;
+ console.log(researchDataInfo);
+ });
+
+ this._communityService.getSoftwareInfo().subscribe(
+ softwareInfo => {
+ this.softwareInfo = softwareInfo;
+ console.log(softwareInfo);
+ });
+
+ // this._communityService
+ // .getPublicationInfo('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/publications?fq=communityid exact "egi"&sortBy=resultdateofacceptance,descending&format=json')
+ // .subscribe(
+ //
+ // });
}
public ngOnDestroy() {
if(this.piwiksub){
diff --git a/src/app/community/community.service.ts b/src/app/community/community.service.ts
index 5af3d18..775de59 100644
--- a/src/app/community/community.service.ts
+++ b/src/app/community/community.service.ts
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs/Rx';
+import { PublicationInfo } from '../../publicationInfo';
@Injectable()
export class CommunityService {
@@ -26,8 +27,23 @@ export class CommunityService {
.map(res =>
res.json()).do(res => {console.log(res)});
}
+ getResearchDataInfo() {
+ return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/datasets?fq=communityid exact "egi"&sortBy=resultdateofacceptance,descending&format=json')
+ .map(res => res.json()).map(res => res.results).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)});
}
+
+ getSoftwareInfo() {
+ return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/software?fq=communityid exact "egi"&sortBy=resultdateofacceptance,descending&format=json')
+ .map(res => res.json()).map(res => res.results).do(res => {console.log(res)});
+ }
+
+ // getPublicationInfo(url: string) {
+ // return this.http.get(url).map(res => res.json()).map(res => res.results).do(res => {console.log(res)});
+ // }
+
}