refreshed monitor

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51146 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
myrto.koukouli 2018-03-12 11:26:23 +00:00
parent 295bc21b4b
commit 56e0810154
4 changed files with 34 additions and 16 deletions

View File

@ -6,13 +6,14 @@
<div *ngIf="statistics" class="uk-margin uk-margin-top uk-text-lead">
<div>
{{statistics.publications}} publications from
{{statistics.publications.total}} publications from
<!--span *ngIf="statistics.virtual_organizations && statistics.virtual_organizations > 0"> {{statistics.virtual_organizations}} VOs and</span-->
{{statistics.total_projects}} projects.
</div>
<div>
{{statistics.open_access}} are OA <span *ngIf="statistics.restricted && statistics.restricted > 0">, {{statistics.restricted}} are restricted </span>
<span *ngIf="statistics.embargo && statistics.embargo > 0">and {{statistics.embargo}} are still in embargo </span>
{{statistics.publications.open_access}} are OA
<span *ngIf="statistics.publications.restricted && statistics.publications.restricted > 0">, {{statistics.publications.restricted}} are restricted </span>
<span *ngIf="statistics.publications.embargo && statistics.publications.embargo > 0">and {{statistics.publications.embargo}} are still in embargo </span>
</div>
</div>
<div *ngIf="charts && charts.timelines && statistics">
@ -25,33 +26,33 @@
<ul id="timelinestabs" class="uk-switcher uk-margin">
<li>
<div *ngIf="charts.timelines.publications.load && statistics.publications > 0">
<div *ngIf="charts.timelines.publications.load && statistics.publications.total > 0">
<i-frame [url]=charts.timelines.publications.url width="1000" height="450"></i-frame>
</div>
<div *ngIf="statistics.publications == 0" class="uk-alert uk-alert-primary">
<div *ngIf="statistics.publications.total == 0" class="uk-alert uk-alert-primary">
No publications available
</div>
</li>
<li>
<div *ngIf="charts.timelines.datasets.load && statistics.datasets > 0">
<div *ngIf="charts.timelines.datasets.load && statistics.datasets.total > 0">
<i-frame [url]=charts.timelines.datasets.url width="1000" height="450"></i-frame>
</div>
<div *ngIf="statistics.datasets == 0" class="uk-alert uk-alert-primary">
<div *ngIf="statistics.datasets.total == 0" class="uk-alert uk-alert-primary">
No research data available
</div>
</li>
<li>
<div *ngIf="charts.timelines.software.load && statistics.software > 0">
<div *ngIf="charts.timelines.software.load && statistics.software.total > 0">
<i-frame [url]=charts.timelines.software.url width="1000" height="450"></i-frame>
</div>
<div *ngIf="statistics.software == 0" class="uk-alert uk-alert-primary">
<div *ngIf="statistics.software.total == 0" class="uk-alert uk-alert-primary">
No software available
</div>
</li>
</ul>
</div>
<div *ngIf="charts && charts.projectPublications && statistics && statistics.publications > 0">
<div *ngIf="charts && charts.projectPublications && statistics && statistics.publications.total > 0">
<div class="uk-text-large" >Publications per projects</div>
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect:'#publicationtabs'}">
<li (click)="charts.projectPublications.columns.load = true"><a href="#">Columns</a></li>
@ -77,7 +78,7 @@
</li>
</ul>
</div>
<div *ngIf="charts && charts.projectDatasets && statistics && statistics.datasets > 0">
<div *ngIf="charts && charts.projectDatasets && statistics && statistics.datasets.total > 0">
<div class="uk-text-large" >Research data per projects</div>
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect:'#datasettabs'}">
<li (click)="charts.projectDatasets.columns.load = true"><a href="#">Columns</a></li>
@ -103,7 +104,7 @@
</li>
</ul>
</div>
<div *ngIf="charts && charts.projectSoftware && statistics && statistics.software > 0">
<div *ngIf="charts && charts.projectSoftware && statistics && statistics.software.total > 0">
<div class="uk-text-large" >Software per projects</div>
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect:'#softwaretabs'}">
<li (click)="charts.projectSoftware.columns.load = true"><a href="#">Columns</a></li>

View File

@ -14,6 +14,7 @@ import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import{ StatisticsService} from '../utils/services/statistics.service';
import {StatisticsSummary} from "./statisticsEntities";
@Component({
selector: 'statistics',
@ -23,12 +24,12 @@ export class StatisticsComponent {
public piwiksub: any;
public subfunders: any;
public pageTitle = "OpenAIRE"
public pageTitle = "OpenAIRE";
properties:EnvProperties;
public communityId = null;
public communityInfo = null;
public statistics = null;
public statistics: StatisticsSummary;
charts = null;
constructor (
private route: ActivatedRoute,
@ -64,7 +65,7 @@ export class StatisticsComponent {
this.route.queryParams.subscribe(
communityId => {
this.communityId = communityId['communityId'];
this._statisticsService.getCommunityStatistics(this.properties.statisticsAPIURL+"/communities/",this.communityId).subscribe (
this._statisticsService.getCommunityStatistics(this.properties.statisticsAPIURL+"communities/",this.communityId).subscribe (
res => {
this.statistics = res;
console.log(this.statistics);

View File

@ -0,0 +1,16 @@
export class StatisticsNumbers {
total: number;
open_access: number;
embargo: number;
restricted: number;
closed_access: number;
}
export class StatisticsSummary {
publications : StatisticsNumbers;
datasets:StatisticsNumbers;
software: StatisticsNumbers;
total_projects: number;
virtual_organizations: number;
}

View File

@ -4,7 +4,7 @@
"useCache" : true,
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
"statisticsAPIURL" : "http://vatopedi.di.uoa.gr:8080/stats/",
"statisticsAPIURL" : "http://vatopedi.di.uoa.gr:8080/stats-api/",
"statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
"claimsAPIURL" : "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",