Rename result variables for json responses
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50518 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
b221a62398
commit
6ede5c03e9
|
@ -12,19 +12,19 @@
|
|||
<div class="uk-child-width-1-6@l uk-child-width-1-6@m uk-child-width-1-3@s uk-text-center uk-grid" uk-grid="">
|
||||
<div class="uk-first-column">
|
||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||
<a><h3 class="uk-card-title">{{res.total}}</h3>
|
||||
<a><h3 class="uk-card-title">{{publications.total}}</h3>
|
||||
<p>publications</p></a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||
<a><h3 class="uk-card-title">{{res2.total}}</h3>
|
||||
<a><h3 class="uk-card-title">{{reasearchData.total}}</h3>
|
||||
<p>research data</p></a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-card uk-card-default uk-card-small uk-card-body">
|
||||
<a><h3 class="uk-card-title">{{res3.total}}</h3>
|
||||
<a><h3 class="uk-card-title">{{software.total}}</h3>
|
||||
<p>software</p></a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,6 +54,21 @@
|
|||
<h3 class="uk-margin-small uk-h3 uk-heading-line uk-text-primary">
|
||||
<span>Most recent publications</span>
|
||||
</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="">
|
||||
<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> <span class=" uk-label uk-label-danger">Data</span> <span class="uk-label uk-label-success">OpenAIRE 3.0</span><br>
|
||||
12469 datasets
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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="">
|
||||
<div class="uk-first-column">
|
||||
<div class="el-item uk-panel">
|
||||
|
|
|
@ -20,9 +20,10 @@ export class CommunityComponent {
|
|||
|
||||
public pageTitle = "OpenAIRE"
|
||||
|
||||
public res=[];
|
||||
public res2=[];
|
||||
public res3=[];
|
||||
public publications=[];
|
||||
public reasearchData=[];
|
||||
public software=[];
|
||||
public publicationsInfo=[];
|
||||
|
||||
constructor (
|
||||
private route: ActivatedRoute,
|
||||
|
@ -52,21 +53,27 @@ export class CommunityComponent {
|
|||
|
||||
public ngOnInit() {
|
||||
this._communityService.getNumberOfPublications().subscribe(
|
||||
res => {
|
||||
this.res = res;
|
||||
console.log(res);
|
||||
publications => {
|
||||
this.publications = publications;
|
||||
console.log(publications);
|
||||
});
|
||||
|
||||
this._communityService.getNumberOfResearchData().subscribe(
|
||||
res2 => {
|
||||
this.res2 = res2;
|
||||
console.log(res2);
|
||||
reasearchData => {
|
||||
this.reasearchData = reasearchData;
|
||||
console.log(reasearchData);
|
||||
});
|
||||
|
||||
this._communityService.getNumberOfSoftware().subscribe(
|
||||
res3 => {
|
||||
this.res3 = res3;
|
||||
console.log(res3);
|
||||
software => {
|
||||
this.software = software;
|
||||
console.log(software);
|
||||
});
|
||||
|
||||
this._communityService.getPublicationsInfo().subscribe(
|
||||
publicationsInfo => {
|
||||
this.publicationsInfo = publicationsInfo;
|
||||
console.log(publicationsInfo);
|
||||
});
|
||||
}
|
||||
public ngOnDestroy() {
|
||||
|
|
|
@ -14,6 +14,13 @@ export class CommunityService {
|
|||
.map(res => <any> res.json()).do(res => {console.log(res)});
|
||||
}
|
||||
|
||||
// Most recent publications
|
||||
getPublicationsInfo(){
|
||||
return this.http.get('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')
|
||||
.map(res => <any> res.json()).map(res => res.results).do(res => {console.log(res)});
|
||||
|
||||
}
|
||||
|
||||
getNumberOfResearchData() {
|
||||
return this.http.get('http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/datasets/count?format=json&fq=communityid=egi')
|
||||
.map(res => <any> res.json()).do(res => {console.log(res)});
|
||||
|
|
Loading…
Reference in New Issue