connect-admin/src/app/pages/stats/stats.component.html

496 lines
49 KiB
HTML

<div id="stats">
<div id="contentWrapper" class="content-wrapper">
<div>
<div class="contentPanel uk-margin-top">
<!-- <div *ngIf="errorMessage" class="uk-alert-danger uk-alert">{{ errorMessage }}</div>
<div *ngIf="loadingMessage" class="loading-big">
<div class="loader-big" style="text-align: center; padding-top: 170px; color: rgb(47, 64, 80); font-weight: bold;">{{ loadingMessage }}</div>
<div class="whiteFilm"></div>
</div> -->
<div *ngIf="statisticsSum" class="page-title uk-article-title">
Statistics
<mat-slide-toggle class="uk-margin-small-left" *ngIf="statisticsDisplay" title="Show/Hide all indicators" [checked]="statisticsDisplay.isActive"
(change)="toggleShowGraphAnalysisView()"></mat-slide-toggle>
</div>
<div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><img class="uk-align-center loading-gif"></div>
<div *ngIf="statisticsSum" class="uk-alert uk-alert-primary uk-margin-top-large">
<div class="uk-flex uk-flex-middle">
<span class="uk-margin-small-right uk-icon uk-icon-justify" uk-icon="warning"></span>
<span>
Options for showing/hiding statistics from the Community Gateway's Overview and Graph Analysis view.<br>
Indicators won't be shown in Community Gateway when the numbers are 0 or the dependent entity is deactivated in spite of their status.
</span>
</div>
</div>
<div *ngIf="!statisticsSum" class="uk-alert uk-alert-primary uk-margin-top-large">
<div class="uk-flex uk-flex-middle">
<span class="uk-margin-small-right uk-icon uk-icon-justify" uk-icon="warning"></span>
<span>
There are no available statistics for your community yet.<br>
</span>
</div>
</div>
<div *ngIf="communityId && statisticsSum">
<div class="users-list">
<div class="col-md-12">
<article class="uk-article ">
<div *ngIf="statisticsDisplay && chartsInfoMap"
class="uk-margin uk-margin-top">
<div>
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect:'#tabs'}">
<li *ngFor="let entity of entitiesList"
(click)="onChangeEntity(entity)">
<a href="#">{{ entitiesMap.get(entity) }}</a>
</li>
</ul>
<ul id="tabs" class="uk-switcher" style="min-height:450px;">
<li *ngFor="let entity of entitiesList">
<div *ngIf="(displayedEntity == entity)">
<div class="uk-heading-divider">
<h3 class="uk-text-capitalize">{{ entitiesMap.get(entity) }} <small *ngIf="deactivatedEntity" class="uk-text-danger uk-text-small">(this entity has been deactivated)</small></h3>
<div uk-grid>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].total|number}}</div>
<div>Total
{{ entity == 'dataset' ? 'research data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['total'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['total'].showInMonitor;
toggleShowInMonitor(entity,'numbers','total')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['total'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['total'].showInDashboard;
toggleShowInDashboard(entity,'numbers','total')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].projects|number}}</div>
<div>Total projects linked to
{{ entity == 'dataset' ? 'research data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['project'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['project'].showInMonitor;
toggleShowInMonitor(entity,'numbers','project')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['project'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['project'].showInDashboard;
toggleShowInDashboard(entity,'numbers','project')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].open_access|number}}</div>
<div>Open Access
{{ entity == 'dataset' ? 'research data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['open'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['open'].showInMonitor;
toggleShowInMonitor(entity,'numbers','open')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['open'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['open'].showInDashboard;
toggleShowInDashboard(entity,'numbers','open')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].closed_access|number}}</div>
<div>Closed Access
{{ entity == 'dataset' ? 'research data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['closed'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['closed'].showInMonitor;
toggleShowInMonitor(entity,'numbers','closed')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['closed'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['closed'].showInDashboard;
toggleShowInDashboard(entity,'numbers','closed')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].restricted|number}}</div>
<div>Restricted
{{ entity == 'dataset' ? 'research data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['restricted'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['restricted'].showInMonitor;
toggleShowInMonitor(entity,'numbers','restricted')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['restricted'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['restricted'].showInDashboard;
toggleShowInDashboard(entity,'numbers','restricted')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="uk-width-1-3">
<div class="uk-flex uk-flex-middle uk-padding uk-padding-remove-top" uk-grid>
<div class="uk-card portal-card uk-text-right uk-padding-small uk-width-1-2">
<div
class="uk-text-large">{{statisticsSum[entity].embargo|number}}</div>
<div>Embargo
{{ entity == 'dataset' ? 'research data' : entitiesMap.get(entity) }}</div>
</div>
<div class="uk-width-expand">
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['embargo'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['embargo'].showInMonitor;
toggleShowInMonitor(entity,'numbers','embargo')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].numbers.map['embargo'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].numbers.map['embargo'].showInDashboard;
toggleShowInDashboard(entity,'numbers','embargo')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div *ngIf="statisticsDisplay.entities[entity].charts.map['timeline'] &&
chartsInfoMap[entity + 'Timeline']"
class="uk-grid">
<div class="uk-width-expand@m uk-width-3-4@l">
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsInfoMap[displayedTimeline].url scrolling="no" class=""></iframe>
</div>
</div>
<div class="uk-margin-top">
<h6>Display options</h6>
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['timeline'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['timeline'].showInMonitor;
toggleShowInMonitor(entity,'charts','timeline')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['timeline'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['timeline'].showInDashboard;
toggleShowInDashboard(entity,'charts','timeline')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
<div *ngIf="statisticsDisplay.entities[entity].charts.map['graph'] &&
chartsInfoMap[entity + 'Graph']"
class="uk-grid">
<div class="uk-width-expand@m uk-width-3-4@l">
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsInfoMap[displayedGraph].url scrolling="no" class=""></iframe>
</div>
</div>
<div class="uk-margin-top">
<h6>Display options</h6>
<table class="uk-table uk-table-striped uk-width-expand@m uk-width-1-1@l">
<thead>
<tr>
<th>Show</th>
<th class="uk-text-center">#</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['graph'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['graph'].showInMonitor;
toggleShowInMonitor(entity,'charts','graph')"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['graph'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['graph'].showInDashboard;
toggleShowInDashboard(entity,'charts','graph')"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
<hr>
</div>
<div>
<h4 class="uk-text-uppercase uk-text-bold">{{ entitiesMap.get(entity) }} per project</h4>
</div>
<div class="uk-grid">
<div class="uk-width-3-4@l uk-width-1-1@m uk-first-column">
<ul class="uk-tab uk-margin-top" data-uk-tab="{connect: '#projectChartTabs'">
<li *ngIf="statisticsDisplay.entities[entity].charts.map['projectColumn'] && chartsInfoMap[entity + 'Projectcolumn']"
(click)="changeDisplayedProjectChart(entity + 'Projectcolumn')">
<a href="#">Columns</a>
</li>
<li *ngIf=" statisticsDisplay.entities[entity].charts.map['projectPie'] && chartsInfoMap[entity + 'Projectpie']"
(click)="changeDisplayedProjectChart(entity + 'Projectpie')">
<a href="#">Pie</a>
</li>
<li *ngIf=" statisticsDisplay.entities[entity].charts.map['projectTable'] && chartsInfoMap[entity + 'Projecttable']"
(click)="changeDisplayedProjectChart(entity + 'Projecttable')">
<a href="#">Table</a>
</li>
</ul>
<ul id="projectChartTabs" class="uk-switcher uk-margin">
<li>
<div *ngIf="displayedProjectChart == (entity + 'Projectcolumn')">
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsInfoMap[displayedProjectChart].url scrolling="no" class=""></iframe>
</div>
</div>
</li>
<li>
<div *ngIf="displayedProjectChart == (entity + 'Projectpie')">
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsInfoMap[displayedProjectChart].url scrolling="no" class=""></iframe>
</div>
</div>
</li>
<li>
<div *ngIf="displayedProjectChart == (entity + 'Projecttable')">
<div class=" iframeContainer uk-height-large uk-margin-top">
<iframe [src]=chartsInfoMap[displayedProjectChart].url scrolling="no" class=""></iframe>
</div>
</div>
</li>
</ul>
</div>
<div class="uk-width-1-4@l uk-width-1-1@m uk-margin-top uk-first-column">
<h6>Display options</h6>
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th>Show</th>
<th>Column</th>
<th>Pie</th>
<th>Table</th>
<th>All</th>
</tr>
</thead>
<tbody>
<tr>
<th>In Graph Analysis</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['projectColumn'].showInMonitor;
toggleShowInMonitor(entity,'charts','projectColumn')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['projectPie'].showInMonitor;
toggleShowInMonitor(entity,'charts','projectPie')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectTable'].showInMonitor"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['projectTable'].showInMonitor;
toggleShowInMonitor(entity,'charts','projectTable')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="showAllInMonitor"
(change)="$event.checked = showAllInMonitor;
toggleShowAllInMonitor(entity)"></mat-slide-toggle>
</th>
</tr>
<tr>
<th>In Overview</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectColumn'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['projectColumn'].showInDashboard;
toggleShowInDashboard(entity,'charts','projectColumn')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectPie'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['projectPie'].showInDashboard;
toggleShowInDashboard(entity,'charts','projectPie')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="statisticsDisplay.entities[entity].charts.map['projectTable'].showInDashboard"
(change)="$event.checked = statisticsDisplay.entities[entity].charts.map['projectTable'].showInDashboard;
toggleShowInDashboard(entity,'charts','projectTable')"></mat-slide-toggle>
</th>
<th class="uk-text-center">
<mat-slide-toggle [checked]="showAllInDashboard"
(change)="$event.checked = showAllInDashboard;
toggleShowAllInDashboard(entity)"></mat-slide-toggle>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</article>
</div>
</div>
</div>
</div>
</div>
</div>
</div>