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
This commit is contained in:
sofia.baltzi 2018-02-02 12:02:04 +00:00
parent 6ede5c03e9
commit 3725a1c09a
4 changed files with 91 additions and 7 deletions

View File

@ -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'},

View File

@ -56,17 +56,22 @@
</h3>
<!--test-->
<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
<li *ngFor="let item of publicationsInfo; let i = index">
<div class="uk-first-column">
<div class="el-item uk-panel">
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">
Aaltodoc Publication Archive
</h6>
<div class="el-meta uk-margin uk-text-meta">Aalto University</div>
<div class="el-content uk-margin"><span class="uk-label">IR</span>&nbsp;<span class=" uk-label uk-label-danger">Data</span>&nbsp;<span class="uk-label uk-label-success">OpenAIRE 3.0</span><br>
12469 datasets
</div>
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">
{{item.result["metadata"]["oaf:entity"]["oaf:result"]["title"]["content"]}}
</h6>
<div class="el-content uk-margin"><span class=" uk-label uk-label-danger">{{item.result["metadata"]["oaf:entity"]["oaf:result"]["bestaccessright"]["classid"]}}</span><br></div>
<!--authors-->
<div *ngFor='let item1 of item.result["metadata"]["oaf:entity"]["oaf:result"]["creator"]; let i = index'>
<div class="el-meta uk-margin uk-text-meta">{{item1["content"]}}</div>
</div>
<div class="el-meta uk-margin uk-text-meta"> {{item.result["metadata"]["oaf:entity"]["oaf:result"]["dateofacceptance"]}} </div>
<div class="text-justify descriptionText"> {{item.result["metadata"]["oaf:entity"]["oaf:result"]["description"]}} </div>
</div>
</div>
</li>
</div>
<!--end of test-->
<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
@ -105,6 +110,25 @@
<span>Most recent research data</span>
</h2>
<!-- <div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
<li *ngFor="let item2 of researchDataInfo; let i = index">
<div class="uk-first-column">
<div class="el-item uk-panel">
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">
{{item2.result["metadata"]["oaf:entity"]["oaf:result"]["title"]["content"]}}
</h6>
<div class="el-content uk-margin"><span class=" uk-label uk-label-danger">{{item2.result["metadata"]["oaf:entity"]["oaf:result"]["bestaccessright"]["classid"]}}</span><br></div>
<!--authors-->
<!-- <div *ngFor='let item3 of item2.result["metadata"]["oaf:entity"]["oaf:result"]["creator"]; let i = index'>
<div class="el-meta uk-margin uk-text-meta">{{item3["content"]}}</div>
</div>
<div class="el-meta uk-margin uk-text-meta"> {{item2.result["metadata"]["oaf:entity"]["oaf:result"]["dateofacceptance"]}} </div>
<div class="text-justify descriptionText"> {{item2.result["metadata"]["oaf:entity"]["oaf:result"]["description"]}} </div>
</div>
</div>
</li>
</div> -->
<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
<div class="uk-first-column">
<div class="el-item uk-panel">
@ -131,6 +155,26 @@
<span>Most recent software</span>
</h2>
<!-- <div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
<li *ngFor="let item4 of publicationsInfo; let i = index">
<div class="uk-first-column">
<div class="el-item uk-panel">
<h6 class="el-title uk-margin uk-h6 uk-text-primary uk-margin-remove-adjacent uk-margin-remove-bottom">
{{item4.result["metadata"]["oaf:entity"]["oaf:result"]["title"]["content"]}}
</h6>
<div class="el-content uk-margin"><span class=" uk-label uk-label-danger">{{item4.result["metadata"]["oaf:entity"]["oaf:result"]["bestaccessright"]["classid"]}}</span><br></div>
<!--authors-->
<!-- <div *ngFor='let item4 of item5.result["metadata"]["oaf:entity"]["oaf:result"]["creator"]; let i = index'>
<div class="el-meta uk-margin uk-text-meta">{{item4["content"]}}</div>
</div>
<div class="el-meta uk-margin uk-text-meta"> {{item4.result["metadata"]["oaf:entity"]["oaf:result"]["dateofacceptance"]}} </div>
<div class="text-justify descriptionText"> {{item4.result["metadata"]["oaf:entity"]["oaf:result"]["description"]}} </div>
</div>
</div>
</li>
</div> -->
<div class="uk-margin-remove-vertical uk-grid-match uk-child-width-1-1 uk-child-width-1-1@m uk-child-width-1-1@l uk-child-width-1-1@xl uk-grid-small uk-grid-divider uk-grid uk-grid-stack" uk-grid="">
<div class="uk-first-column">
<div class="el-item uk-panel">

View File

@ -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){

View File

@ -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 => <any> 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 => <any> 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 => <any> 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 => <any> res.json()).map(res => res.results).do(res => {console.log(res)});
}
// getPublicationInfo(url: string) {
// return this.http.get(url).map(res => <any> res.json()).map(res => res.results).do(res => {console.log(res)});
// }
}