statistics: fixed dashboard details
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51687 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
99afee5cc6
commit
55e1c9531c
|
@ -5,9 +5,9 @@
|
|||
</div>
|
||||
<div>
|
||||
<div *ngFor="let entity of allowedEntities">
|
||||
<div *ngIf="statisticsSum[entity].total>0">
|
||||
<div *ngIf="statisticsSum[entity].total>0 && allowedCharts[entity].length>0">
|
||||
<div class="uk-text-uppercase uk-text-bold uk-heading-divider">
|
||||
<h3>{{ entity == 'software' ? getCamelCaseString(entity) : (entity == 'dataset'? 'Research Data' : getCamelCaseString(entity) + 's') }}</h3>
|
||||
<h3>{{ entitiesMap.get(entity) }}</h3>
|
||||
</div>
|
||||
<div *ngIf="allowedCharts[entity]" class="uk-grid">
|
||||
<div *ngFor="let chart of allowedCharts[entity]" class="uk-width-1-2@l uk-width-1-1@m uk-first-column">
|
||||
|
|
|
@ -82,11 +82,11 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="statisticsSum[entity].total>0 && !allowedCharts[entity]"
|
||||
<div *ngIf="statisticsSum[entity].total>0 && allowedCharts[entity].length==0"
|
||||
class="uk-alert uk-alert-info">
|
||||
No charts available
|
||||
</div>
|
||||
<div *ngIf="statisticsSum[entity].total>0 && allowedCharts[entity]">
|
||||
<div *ngIf="statisticsSum[entity].total>0 && allowedCharts[entity].length>0">
|
||||
<div class="uk-grid">
|
||||
<div *ngIf="statisticsDisplay.entities[entity].charts.map['timeline'] &&
|
||||
statisticsDisplay.entities[entity].charts.map['timeline'][currentMode] &&
|
||||
|
@ -102,6 +102,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div *ngIf="statisticsDisplay.entities[entity].charts.map['projectColumn'][currentMode] ||
|
||||
statisticsDisplay.entities[entity].charts.map['projectPie'][currentMode] ||
|
||||
statisticsDisplay.entities[entity].charts.map['projectTable'][currentMode]">
|
||||
<div>
|
||||
<h4 class="uk-text-uppercase uk-text-bold">{{ entitiesMap.get(entity) }} per project</h4>
|
||||
</div>
|
||||
|
@ -149,6 +152,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -8,11 +8,6 @@ import "rxjs/add/observable/zip";
|
|||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
|
||||
|
||||
import {
|
||||
availableCharts, availableEntities, availableEntitiesMap, StatisticsDisplay,
|
||||
StatisticsSummary
|
||||
} from "./statisticsEntities";
|
||||
|
||||
import {StatisticsService} from '../utils/services/statistics.service';
|
||||
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
|
@ -22,6 +17,10 @@ import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.
|
|||
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
|
||||
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
||||
import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
|
||||
import {
|
||||
availableCharts, availableEntitiesMap, StatisticsDisplay,
|
||||
StatisticsSummary
|
||||
} from "../openaireLibrary/connect/statistics/statisticsEntities";
|
||||
|
||||
@Component({
|
||||
selector: 'statistics',
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
export const availableCharts = [
|
||||
'timeline',
|
||||
'graph',
|
||||
'projectColumn',
|
||||
'projectPie',
|
||||
'projectTable'
|
||||
];
|
||||
|
||||
export const availableNumbers = [
|
||||
'total',
|
||||
'project',
|
||||
'open',
|
||||
'closed',
|
||||
'restricted',
|
||||
'embargo',
|
||||
];
|
||||
|
||||
export const availableEntities = [
|
||||
'publication',
|
||||
'dataset',
|
||||
'software'
|
||||
];
|
||||
|
||||
export const availableEntitiesMap = new Map([
|
||||
['publication', 'Publications'],
|
||||
['dataset', 'Research Data'],
|
||||
['software', 'Software']
|
||||
]);
|
||||
|
||||
export class DisplayStatsOptions {
|
||||
showInMonitor: boolean;
|
||||
showInDashboard: boolean;
|
||||
}
|
||||
|
||||
export class StatisticsMap {
|
||||
map: Map<string,DisplayStatsOptions>;
|
||||
}
|
||||
|
||||
export class EntityStats {
|
||||
charts: StatisticsMap;
|
||||
numbers: StatisticsMap;
|
||||
}
|
||||
|
||||
export class StatisticsDisplay {
|
||||
pid: string;
|
||||
entities: Map<string,EntityStats>;
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class StatisticsNumbers {
|
||||
total: number;
|
||||
open_access: number;
|
||||
embargo: number;
|
||||
restricted: number;
|
||||
closed_access: number;
|
||||
projects: number;
|
||||
}
|
||||
|
||||
export class StatisticsSummary {
|
||||
publications : StatisticsNumbers;
|
||||
datasets: StatisticsNumbers;
|
||||
software: StatisticsNumbers;
|
||||
total_projects: number;
|
||||
virtual_organizations: number;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Http, Response, Headers, RequestOptions } from '@angular/http';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { StatisticsDisplay, StatisticsSummary } from '../../statistics/statisticsEntities';
|
||||
import {StatisticsDisplay, StatisticsSummary} from "../../openaireLibrary/connect/statistics/statisticsEntities";
|
||||
|
||||
|
||||
@Injectable()
|
||||
|
|
Loading…
Reference in New Issue