Add communityId as a parameter at community.component's link

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50967 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-02-28 11:07:15 +00:00
parent f85c536b8a
commit 61da0ee819
1 changed files with 30 additions and 29 deletions

View File

@ -71,35 +71,6 @@ export class CommunityComponent {
});
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications/count?format=json&fq=communityid=egi').subscribe(
publicationTotal => {
this.publicationTotal = publicationTotal;
});
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets/count?format=json&fq=communityid=egi').subscribe(
researchDataTotal => {
this.researchDataTotal = researchDataTotal;
});
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/software/count?format=json&fq=communityid=egi').subscribe(
softwareTotal => {
this.softwareTotal = softwareTotal;
});
this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications?fq=communityid%20exact%20%22egi%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
publicationResults => {
this.publicationResults = publicationResults;
});
this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets?fq=communityid%20exact%20%22egi%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
researchDataResults => {
this.researchDataResults = researchDataResults;
});
this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/software?fq=communityid%20exact%20%22egi%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
softwareResults => {
this.softwareResults = softwareResults;
});
this.route.queryParams.subscribe(
communityId => {
@ -113,6 +84,36 @@ export class CommunityComponent {
console.log(communityInfo);
});
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications/count?format=json&fq=communityid='+this.communityId).subscribe(
publicationTotal => {
this.publicationTotal = publicationTotal;
});
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets/count?format=json&fq=communityid='+this.communityId).subscribe(
researchDataTotal => {
this.researchDataTotal = researchDataTotal;
});
this._communityService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/software/count?format=json&fq=communityid='+this.communityId).subscribe(
softwareTotal => {
this.softwareTotal = softwareTotal;
});
this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
publicationResults => {
this.publicationResults = publicationResults;
});
this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/datasets?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
researchDataResults => {
this.researchDataResults = researchDataResults;
});
this._communityService.getResults('http://beta.services.openaire.eu:8480/search/rest/v2/api/software?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
softwareResults => {
this.softwareResults = softwareResults;
});
}