From 3725a1c09a5a5817f35a526ab96b2a4d2a6dd608 Mon Sep 17 00:00:00 2001 From: "sofia.baltzi" Date: Fri, 2 Feb 2018 12:02:04 +0000 Subject: [PATCH] Add - Get more recent publications git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50568 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.module.ts | 1 + src/app/community/community.component.html | 58 +++++++++++++++++++--- src/app/community/community.component.ts | 23 +++++++++ src/app/community/community.service.ts | 16 ++++++ 4 files changed, 91 insertions(+), 7 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index adffd5d..dd883be 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -26,6 +26,7 @@ NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, BrowserModule.withServerTransition({appId: 'my-app'}), RouterModule.forRoot([ + // { path: '', loadChildren: './community/community.module#CommunityModule'}, { path: '', loadChildren: './home/home.module#HomeModule'}, { path: 'home', loadChildren: './home/home.module#HomeModule'}, { path: 'community', loadChildren: './community/community.module#CommunityModule'}, diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index b14a160..7bcf684 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -56,17 +56,22 @@
+
  • -
    - Aaltodoc Publication Archive -
    -
    Aalto University
    -
    IR Data OpenAIRE 3.0
    - 12469 datasets -
    +
    + {{item.result["metadata"]["oaf:entity"]["oaf:result"]["title"]["content"]}} +
    +
    {{item.result["metadata"]["oaf:entity"]["oaf:result"]["bestaccessright"]["classid"]}}
    + +
    +
    {{item1["content"]}}
    +
    +
    {{item.result["metadata"]["oaf:entity"]["oaf:result"]["dateofacceptance"]}}
    +
    {{item.result["metadata"]["oaf:entity"]["oaf:result"]["description"]}}
    +
  • @@ -105,6 +110,25 @@ Most recent research data + + +
    @@ -131,6 +155,26 @@ Most recent software + + + +
    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)}); + // } + }