From 56e0810154d6b23f02db68af4535fc310632c307 Mon Sep 17 00:00:00 2001 From: "myrto.koukouli" Date: Mon, 12 Mar 2018 11:26:23 +0000 Subject: [PATCH] refreshed monitor git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51146 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/statistics/statistics.component.html | 25 ++++++++++---------- src/app/statistics/statistics.component.ts | 7 +++--- src/app/statistics/statisticsEntities.ts | 16 +++++++++++++ src/assets/env-properties.json | 2 +- 4 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 src/app/statistics/statisticsEntities.ts diff --git a/src/app/statistics/statistics.component.html b/src/app/statistics/statistics.component.html index 8857c6e..3a31376 100644 --- a/src/app/statistics/statistics.component.html +++ b/src/app/statistics/statistics.component.html @@ -6,13 +6,14 @@
- {{statistics.publications}} publications from + {{statistics.publications.total}} publications from {{statistics.total_projects}} projects.
- {{statistics.open_access}} are OA , {{statistics.restricted}} are restricted - and {{statistics.embargo}} are still in embargo + {{statistics.publications.open_access}} are OA + , {{statistics.publications.restricted}} are restricted + and {{statistics.publications.embargo}} are still in embargo
@@ -25,33 +26,33 @@
-
+
Publications per projects
-
+
Research data per projects
-
+
Software per projects
  • Columns
  • diff --git a/src/app/statistics/statistics.component.ts b/src/app/statistics/statistics.component.ts index 34e6558..8cafd40 100644 --- a/src/app/statistics/statistics.component.ts +++ b/src/app/statistics/statistics.component.ts @@ -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); diff --git a/src/app/statistics/statisticsEntities.ts b/src/app/statistics/statisticsEntities.ts new file mode 100644 index 0000000..c1e5aa2 --- /dev/null +++ b/src/app/statistics/statisticsEntities.ts @@ -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; +} \ No newline at end of file diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json index 0ad842e..168833c 100644 --- a/src/assets/env-properties.json +++ b/src/assets/env-properties.json @@ -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/",