Revision 57666
Added by Stefania Martziou over 4 years ago
modules/open-science-observatory-ui/trunk/src/app/pages/countrypage/country-page.component.ts | ||
---|---|---|
1 |
import { Component, DoCheck, OnInit, ViewEncapsulation } from '@angular/core'; |
|
2 |
import { DataService } from '../../services/data.service'; |
|
3 |
import { OverviewData } from '../../domain/overview-data'; |
|
4 |
import { ActivatedRoute } from '@angular/router'; |
|
5 |
|
|
6 |
@Component({ |
|
7 |
selector: 'app-country-page', |
|
8 |
templateUrl: './country-page.component.html', |
|
9 |
// styleUrls: ['./top-menu.component.css'], |
|
10 |
encapsulation: ViewEncapsulation.None |
|
11 |
}) |
|
12 |
|
|
13 |
export class CountryPageComponent implements OnInit { |
|
14 |
|
|
15 |
countryName: string; |
|
16 |
|
|
17 |
// overviewData: OverviewData; |
|
18 |
|
|
19 |
// countrySelectedName: string = null; |
|
20 |
|
|
21 |
constructor(private dataService: DataService, |
|
22 |
private route: ActivatedRoute) { } |
|
23 |
|
|
24 |
ngOnInit(): void { |
|
25 |
|
|
26 |
this.countryName = this.route.snapshot.paramMap.get('countryName'); |
|
27 |
console.log('Country name: ', this.countryName); |
|
28 |
// this.dataService.getCountryData('').subscribe( |
|
29 |
// overviewData => { |
|
30 |
// this.overviewData = overviewData; |
|
31 |
// }, |
|
32 |
// error => { |
|
33 |
// console.log(error); |
|
34 |
// } |
|
35 |
// ); |
|
36 |
} |
|
37 |
} |
modules/open-science-observatory-ui/trunk/src/app/pages/home/data-view.component.html | ||
---|---|---|
41 | 41 |
</a> |
42 | 42 |
</li> |
43 | 43 |
</ul> |
44 |
<div class="actionButtons uk-text-right"> |
|
45 |
<button class="md-btn md-btn-secondary" (click)="printOverviewData('table-absolute')"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button> |
|
46 |
<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button> |
|
47 |
</div> |
|
44 | 48 |
|
45 | 49 |
<hr> |
46 | 50 |
|
47 | 51 |
<ul id="switcher-content-a-fade" class="uk-switcher uk-margin"> |
48 | 52 |
<li aria-hidden="false" class="uk-active" style="animation-duration: 200ms;"> |
49 |
<div class="dataContent">
|
|
50 |
<div class="actionButtons uk-text-right">
|
|
51 |
<button class="md-btn md-btn-secondary" (click)="printOverviewData()"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button>
|
|
52 |
<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button>
|
|
53 |
</div>
|
|
54 |
</div>
|
|
55 |
<div id="printable-section" class="dataContent">
|
|
53 |
<!--<div class="dataContent">-->
|
|
54 |
<!--<div class="actionButtons uk-text-right">-->
|
|
55 |
<!--<button class="md-btn md-btn-secondary" (click)="printOverviewData('table-absolute')"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button>-->
|
|
56 |
<!--<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button>-->
|
|
57 |
<!--</div>-->
|
|
58 |
<!--</div>-->
|
|
59 |
<div id="table-absolute" class="">
|
|
56 | 60 |
<app-countries-table [isPercentage]="false" [type]="type" [countries]="countries"></app-countries-table> |
57 | 61 |
</div> |
58 | 62 |
</li> |
59 | 63 |
<li aria-hidden="true" style="animation-duration: 200ms;" class=""> |
60 |
<div class="dataContent">
|
|
61 |
<div class="actionButtons uk-text-right">
|
|
62 |
<button class="md-btn md-btn-secondary"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button>
|
|
63 |
<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button>
|
|
64 |
</div>
|
|
65 |
</div>
|
|
66 |
<div class="dataContent">
|
|
64 |
<!--<div class="dataContent">-->
|
|
65 |
<!--<div class="actionButtons uk-text-right">-->
|
|
66 |
<!--<button class="md-btn md-btn-secondary" (click)="printOverviewData('table-percentage')"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button>-->
|
|
67 |
<!--<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button>-->
|
|
68 |
<!--</div>-->
|
|
69 |
<!--</div>-->
|
|
70 |
<div id="table-percentage" class="">
|
|
67 | 71 |
<app-countries-table [isPercentage]="true" [type]="type" [countries]="countries"></app-countries-table> |
68 | 72 |
</div> |
69 | 73 |
</li> |
70 | 74 |
<li aria-hidden="true" style="animation-duration: 200ms;" class=""> |
71 |
<div class="dataContent"> |
|
72 |
<div class="actionButtons uk-text-right"> |
|
73 |
<button class="md-btn md-btn-secondary"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button> |
|
74 |
<!--<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button>--> |
|
75 |
</div> |
|
76 |
<div class="uk-grid uk-margin-top"> |
|
75 |
<!--<div class="dataContent">--> |
|
76 |
<!--<div class="actionButtons uk-text-right">--> |
|
77 |
<!--<button class="md-btn md-btn-secondary" (click)="printOverviewData('graphs')"><i class="fas fa-print uk-margin-small-right"></i>Print report in PDF</button>--> |
|
78 |
<!--<!–<button class="md-btn md-btn-secondary uk-margin-left"><i class="fas fa-download uk-margin-small-right"></i>Download report</button>–>--> |
|
79 |
<!--</div>--> |
|
80 |
<!--<div id="graphs">--> |
|
81 |
<!--<div *ngIf="type=='overview'" class="uk-grid uk-margin-top">--> |
|
82 |
<!--<div class="uk-width-1-2">--> |
|
83 |
<!--<iframe *ngIf="oaJournalsURL" width="100%" height="440" [src]="oaJournalsURL"></iframe>--> |
|
84 |
<!--</div>--> |
|
85 |
<!--<div class="uk-width-1-2">--> |
|
86 |
<!--<iframe *ngIf="oaRepositoriesURL" width="100%" height="440" [src]="oaRepositoriesURL"></iframe>--> |
|
87 |
<!--</div>--> |
|
88 |
<!--</div>--> |
|
89 |
<!--<div class="uk-grid uk-margin-top">--> |
|
90 |
<!--<div class="uk-width-1-2">--> |
|
91 |
<!--<iframe *ngIf="oaPublicationsURL" width="100%" height="440" [src]="oaPublicationsURL"></iframe>--> |
|
92 |
<!--</div>--> |
|
93 |
<!--<div class="uk-width-1-2">--> |
|
94 |
<!--<iframe *ngIf="oaDatasetsURL" width="100%" height="440" [src]="oaDatasetsURL"></iframe>--> |
|
95 |
<!--</div>--> |
|
96 |
<!--</div>--> |
|
97 |
<!--<div class="uk-grid uk-margin-top">--> |
|
98 |
<!--<div class="uk-width-1-2">--> |
|
99 |
<!--<iframe *ngIf="oaSoftwareURL" width="100%" height="440" [src]="oaSoftwareURL"></iframe>--> |
|
100 |
<!--</div>--> |
|
101 |
<!--<div class="uk-width-1-2">--> |
|
102 |
<!--<iframe *ngIf="oaOtherURL" width="100%" height="440" [src]="oaOtherURL"></iframe>--> |
|
103 |
<!--</div>--> |
|
104 |
<!--</div>--> |
|
105 |
<!--</div>--> |
|
106 |
<!--</div>--> |
|
107 |
<div id="graphs"> |
|
108 |
<div *ngIf="type=='overview'" class="uk-grid uk-margin-top"> |
|
77 | 109 |
<div class="uk-width-1-2"> |
78 |
<!--<iframe style="width: 100%; height:400px" src="http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oajournals%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%2520Access%2520Journals%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%2520Data%2520available%2520for%2520the%2520Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%2520by%2520OpenAIRE%2520via%2520HighCharts%22%7D%7D%7D"></iframe>--> |
|
79 |
<iframe *ngIf="oaPublicationsURL" width="100%" height="440" [src]="oaPublicationsURL"></iframe> |
|
110 |
<iframe *ngIf="oaJournalsURL" width="100%" height="440" [src]="oaJournalsURL"></iframe> |
|
80 | 111 |
</div> |
81 | 112 |
<div class="uk-width-1-2"> |
82 | 113 |
<iframe *ngIf="oaRepositoriesURL" width="100%" height="440" [src]="oaRepositoriesURL"></iframe> |
... | ... | |
84 | 115 |
</div> |
85 | 116 |
<div class="uk-grid uk-margin-top"> |
86 | 117 |
<div class="uk-width-1-2"> |
87 |
<iframe *ngIf="oaJournalsURL" width="100%" height="440" [src]="oaJournalsURL"></iframe>
|
|
118 |
<iframe *ngIf="oaPublicationsURL" width="100%" height="440" [src]="oaPublicationsURL"></iframe>
|
|
88 | 119 |
</div> |
89 | 120 |
<div class="uk-width-1-2"> |
90 | 121 |
<iframe *ngIf="oaDatasetsURL" width="100%" height="440" [src]="oaDatasetsURL"></iframe> |
... | ... | |
98 | 129 |
<iframe *ngIf="oaOtherURL" width="100%" height="440" [src]="oaOtherURL"></iframe> |
99 | 130 |
</div> |
100 | 131 |
</div> |
101 |
<!--Graphs here....--> |
|
102 | 132 |
</div> |
103 |
|
|
104 | 133 |
</li> |
105 | 134 |
</ul> |
modules/open-science-observatory-ui/trunk/src/app/pages/home/data-view.component.ts | ||
---|---|---|
30 | 30 |
this.activeView = view; |
31 | 31 |
if (view === 'graph') { |
32 | 32 |
if (!this.oaPublicationsURL) { |
33 |
this.oaPublicationsURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oajournals%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Journals%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
33 |
this.oaPublicationsURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oapublications%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Publications%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
34 | 34 |
} |
35 | 35 |
if (!this.oaRepositoriesURL) { |
36 |
this.oaRepositoriesURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Repositories%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oarepositories%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Repositories%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Repositories%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
36 |
this.oaRepositoriesURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Repositories%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oarepositories%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Repositories%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
37 | 37 |
} |
38 | 38 |
if (!this.oaJournalsURL) { |
39 |
this.oaJournalsURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oapublications%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Publications%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Publications%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22year%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
39 |
this.oaJournalsURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Publications%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oajournals%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Journals%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
40 | 40 |
} |
41 | 41 |
if (!this.oaDatasetsURL) { |
42 |
this.oaDatasetsURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Datasets%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oadatasets%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Datasets%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Datasets%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22country%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
42 |
this.oaDatasetsURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Datasets%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oadatasets%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Datasets%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
43 | 43 |
} |
44 | 44 |
if (!this.oaSoftwareURL) { |
45 |
this.oaSoftwareURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Software%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oasoftware%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Software%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Software%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22country%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
45 |
this.oaSoftwareURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Software%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oasoftware%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Software%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
46 | 46 |
} |
47 | 47 |
if (!this.oaOtherURL) { |
48 |
this.oaOtherURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Other%20Research%20Products%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oaother%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Other%20Research%20Products%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22Other%20Research%20Products%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22country%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Afalse%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Atrue%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
48 |
this.oaOtherURL = this.sanitizer.bypassSecurityTrustResourceUrl(`http://88.197.53.71:8080/stats-api/chart?json=%7B%22library%22%3A%22HighCharts%22%2C%22chartDescription%22%3A%7B%22queries%22%3A%5B%7B%22name%22%3A%22Other%20Research%20Products%22%2C%22type%22%3A%22bar%22%2C%22query%22%3A%7B%22name%22%3A%22oso.oaother%22%7D%7D%5D%2C%22chart%22%3A%7B%22backgroundColor%22%3A%22%23FFFFFFFF%22%2C%22borderColor%22%3A%22%23335cadff%22%2C%22borderRadius%22%3A0%2C%22borderWidth%22%3A0%2C%22plotBorderColor%22%3A%22%23ccccccff%22%2C%22plotBorderWidth%22%3A0%7D%2C%22title%22%3A%7B%22text%22%3A%22Open%20Access%20Other%20Research%20Products%22%7D%2C%22subtitle%22%3A%7B%7D%2C%22yAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22xAxis%22%3A%7B%22title%22%3A%7B%22text%22%3A%22%22%7D%7D%2C%22lang%22%3A%7B%22noData%22%3A%22No%20Data%20available%20for%20the%20Query%22%7D%2C%22exporting%22%3A%7B%22enabled%22%3Atrue%7D%2C%22plotOptions%22%3A%7B%22series%22%3A%7B%22dataLabels%22%3A%7B%22enabled%22%3Atrue%7D%7D%7D%2C%22legend%22%3A%7B%22enabled%22%3Afalse%2C%22align%22%3A%22center%22%2C%22verticalAlign%22%3A%22bottom%22%2C%22layout%22%3A%22horizontal%22%7D%2C%22credits%22%3A%7B%22href%22%3Anull%2C%22enabled%22%3Atrue%2C%22text%22%3A%22Created%20by%20OpenAIRE%20via%20HighCharts%22%7D%7D%7D`);
|
|
49 | 49 |
} |
50 | 50 |
} |
51 | 51 |
} |
52 | 52 |
|
53 |
printOverviewData() { |
|
54 |
printPage(); |
|
53 |
printOverviewData(sectionID: string) {
|
|
54 |
printPage(sectionID);
|
|
55 | 55 |
} |
56 | 56 |
|
57 | 57 |
ngOnInit(): void { |
modules/open-science-observatory-ui/trunk/src/app/pages/home/home.component.html | ||
---|---|---|
1 | 1 |
<!--MAP AND OVERVIEW NUMBERS SECTION--> |
2 | 2 |
<section class="section greySection" id="sect-overview"> |
3 |
<div class="uk-container uk-container-expand uk-container-center uk-scrollspy-init-inview uk-scrollspy-inview uk-animation-scale-up" data-uk-scrollspy="{cls:'uk-animation-scale-up uk-invisible',delay:300,topoffset:-100}"> |
|
3 |
<div class="uk-container uk-container-expand uk-container-center uk-scrollspy-init-inview uk-scrollspy-inview uk-animation-scale-up uk-padding-remove uk-margin-bottom" data-uk-scrollspy="{cls:'uk-animation-scale-up uk-invisible',delay:300,topoffset:-100}">
|
|
4 | 4 |
|
5 |
<div class="uk-grid uk-grid-small uk-margin-bottom uk-grid-match" uk-height-viewport="offset-bottom: 20">
|
|
5 |
<div class="uk-grid uk-grid-small uk-margin-bottom uk-grid-match" uk-height-viewport="offset-bottom: 25">
|
|
6 | 6 |
|
7 | 7 |
<div class="uk-width-large-4-5 uk-width-medium-3-4"> |
8 | 8 |
|
... | ... | |
84 | 84 |
<!--</div>--> |
85 | 85 |
</div> |
86 | 86 |
|
87 |
</div> |
|
88 |
<div class="uk-container uk-container-expand uk-container-center uk-scrollspy-init-inview uk-scrollspy-inview uk-animation-scale-up" data-uk-scrollspy="{cls:'uk-animation-scale-up uk-invisible',delay:300,topoffset:-100}"> |
|
89 |
|
|
87 | 90 |
<div class=""> |
88 | 91 |
<!--Overview cards--> |
89 | 92 |
<div *ngIf="overviewData?.overview" class="uk-width-1-1 indicatorCards"> |
modules/open-science-observatory-ui/trunk/src/app/services/data.service.ts | ||
---|---|---|
21 | 21 |
return this.httpClient.get<OverviewData>(this._jsonURl, headerOptions); |
22 | 22 |
} |
23 | 23 |
|
24 |
// public getOverviewData(): Observable<OverviewData> {
|
|
25 |
// return ;
|
|
26 |
// }
|
|
24 |
public getCountryData(countryName: string) {
|
|
25 |
return null;
|
|
26 |
} |
|
27 | 27 |
} |
modules/open-science-observatory-ui/trunk/src/app/shared/reusablecomponents/print-function.ts | ||
---|---|---|
2 | 2 |
import domtoimage from 'dom-to-image'; |
3 | 3 |
|
4 | 4 |
|
5 |
export function printPage() { |
|
6 |
const node = document.getElementById('printable-section');
|
|
5 |
export function printPage(sectionID: string) {
|
|
6 |
const node = document.getElementById(sectionID);
|
|
7 | 7 |
|
8 | 8 |
let img; |
9 | 9 |
let filename; |
modules/open-science-observatory-ui/trunk/src/app/app.module.ts | ||
---|---|---|
10 | 10 |
import { DataViewComponent } from './pages/home/data-view.component'; |
11 | 11 |
import { HighchartsChartModule } from 'highcharts-angular'; |
12 | 12 |
import { CountriesMapOverviewComponent } from './pages/home/countries-map-overview.component'; |
13 |
import { CountryPageComponent } from './pages/countrypage/country-page.component'; |
|
13 | 14 |
|
14 | 15 |
@NgModule({ |
15 | 16 |
declarations: [ |
... | ... | |
17 | 18 |
HomeComponent, |
18 | 19 |
CountriesTableComponent, |
19 | 20 |
DataViewComponent, |
20 |
CountriesMapOverviewComponent |
|
21 |
CountriesMapOverviewComponent, |
|
22 |
CountryPageComponent |
|
21 | 23 |
], |
22 | 24 |
imports: [ |
23 | 25 |
BrowserModule, |
modules/open-science-observatory-ui/trunk/src/app/app-routing.module.ts | ||
---|---|---|
2 | 2 |
import { Routes, RouterModule } from '@angular/router'; |
3 | 3 |
import { HomeComponent } from './pages/home/home.component'; |
4 | 4 |
import { CountriesMapOverviewComponent } from './pages/home/countries-map-overview.component'; |
5 |
import {CountryPageComponent} from './pages/countrypage/country-page.component'; |
|
5 | 6 |
|
6 | 7 |
const routes: Routes = [ |
7 | 8 |
{ |
... | ... | |
17 | 18 |
path: 'overview-map-embed', |
18 | 19 |
component: CountriesMapOverviewComponent |
19 | 20 |
}, |
21 |
{ |
|
22 |
path: 'countryDashboard/:countryName', |
|
23 |
component: CountryPageComponent |
|
24 |
}, |
|
20 | 25 |
]; |
21 | 26 |
|
22 | 27 |
@NgModule({ |
modules/open-science-observatory-ui/trunk/src/assets/css/os-observatory-custom.css | ||
---|---|---|
217 | 217 |
border: 1px solid #E0E0E0; |
218 | 218 |
padding: 30px; |
219 | 219 |
} |
220 |
|
|
221 |
.actionButtons { |
|
222 |
margin-top: -50px; |
|
223 |
} |
Also available in: Unified diff
Continue working on the overview page and created the component for the country page