Add communitiesAPI link in env-properties, Use communityAPI and communitiesAPI instead of links for community and communities component

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51238 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-03-14 14:38:57 +00:00
parent f39df4d185
commit 368969bc22
3 changed files with 19 additions and 10 deletions

View File

@ -56,12 +56,13 @@ export class CommunitiesComponent {
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE").subscribe();
}
});
this._communitiesService.getCommunities('https://dev-openaire.d4science.org/openaire/community/communities').subscribe(
this._communitiesService.getCommunities(this.properties.communitiesAPI).subscribe(
communitiesResults => {
this.communitiesResults = communitiesResults;
//console.log(communitiesResults);
});
});
}
public ngOnDestroy() {

View File

@ -75,13 +75,20 @@ export class CommunityComponent {
this.communityId = communityId['communityId'];
});
this._communityService.getCommunity('https://dev-openaire.d4science.org/openaire/community/'+this.communityId).subscribe (
this._communityService.getCommunity(this.properties.communityAPI+this.communityId).subscribe (
community => {
this.community = community;
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
//console.log(community);
});
// this._communityService.getCommunity('https://dev-openaire.d4science.org/openaire/community/'+this.communityId).subscribe (
// community => {
// this.community = community;
// this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
// //console.log(community);
// });
this._searchEntriesService.getTotal('http://beta.services.openaire.eu:8480/search/rest/v2/api/publications/count?format=json&fq=communityid='+this.communityId).subscribe(
publicationTotal => {
this.publicationTotal = publicationTotal;
@ -97,19 +104,19 @@ export class CommunityComponent {
this.softwareTotal = softwareTotal;
});
this._searchEntriesService.countTotal('https://dev-openaire.d4science.org/openaire/community/'+this.communityId+'/projects').subscribe(
this._searchEntriesService.countTotal(this.properties.communityAPI+this.communityId+'/projects').subscribe(
projectTotal => {
this.projectTotal = projectTotal;
//console.log(projectTotal);
});
this._searchEntriesService.countTotal('https://dev-openaire.d4science.org/openaire/community/'+this.communityId+'/contentproviders').subscribe(
this._searchEntriesService.countTotal(this.properties.communityAPI+this.communityId+'/contentproviders').subscribe(
contentProviderTotal => {
this.contentProviderTotal = contentProviderTotal;
//console.log(contentProviderTotal);
});
// this._searchEntriesService.countTotal('https://dev-openaire.d4science.org/openaire/community/'+this.communityId+'/organizations').subscribe(
// this._searchEntriesService.countTotal(this.properties.communityAPI+this.communityId+'/organizations').subscribe(
// organizationTotal => {
// this.organizationTotal = organizationTotal;
// console.log(organizationTotal);

View File

@ -61,6 +61,7 @@
"adminToolsCommunity" :"openaire",
"communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
"communitiesAPI": "https://dev-openaire.d4science.org/openaire/community/communities",
"csvLimit": 2000,
"pagingLimit": 20,