From b7cb9d221d9825541506db7fc29bea722580363d Mon Sep 17 00:00:00 2001 From: "myrto.koukouli" Date: Wed, 7 Mar 2018 09:48:17 +0000 Subject: [PATCH] moving from office! git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@51070 d315682c-612b-4755-9ff5-7f18f6832af3 --- app/pages/stats/stats.component.html | 113 ++++++++++++++++++++++++++- app/pages/stats/stats.component.ts | 18 ++++- assets/env-properties.json | 2 +- 3 files changed, 127 insertions(+), 6 deletions(-) diff --git a/app/pages/stats/stats.component.html b/app/pages/stats/stats.component.html index 26cfaa8..9f664bf 100644 --- a/app/pages/stats/stats.component.html +++ b/app/pages/stats/stats.component.html @@ -1 +1,112 @@ -
Waiting for stats page!
\ No newline at end of file +
+ + +
+
+
+
{{ errorMessage }}
+
+ {{ loadingMessage }} +
+ +
+
+
+ + +
+
+
+ +
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameStateTypeRelated EntitiesRouteActionsPage Help ContentsClass Help Contents
+ +
{{check.page.name}}
+
+
+ +
+
+ +
+
+
{{check.page.type}}
+
+
+ {{entity.name}}, +
+
+
{{check.page.route}}
+
+
+ + +
+
+ add page contents + + add class contents + - +
+ +
+
No pages found
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/app/pages/stats/stats.component.ts b/app/pages/stats/stats.component.ts index d1cb86d..73ba9d8 100644 --- a/app/pages/stats/stats.component.ts +++ b/app/pages/stats/stats.component.ts @@ -1,6 +1,8 @@ import {Component, OnInit} from "@angular/core"; import {HelpContentService} from "../../services/help-content.service"; import {CommunityStatistics} from "../../domain/statistics-classes"; +import {ActivatedRoute} from "@angular/router"; +import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; @Component({ selector: 'stats', @@ -11,17 +13,25 @@ export class StatsComponent implements OnInit { stats: CommunityStatistics; tableNames: string[] = []; + properties:EnvProperties = null; - constructor(private contentService: HelpContentService) {} + constructor(private contentService: HelpContentService, + private route: ActivatedRoute) {} ngOnInit() { - this.getStatistics(); + this.route.data + .subscribe((data: { envSpecific: EnvProperties }) => { + this.properties = data.envSpecific; + this.getStatistics(); + }); } getStatistics() { - this.contentService.getStatistics('egi',"").subscribe( + this.contentService.getStatistics('egi',this.properties.adminToolsAPIURL).subscribe( stats => this.stats = stats, - error => console.log(error), + error => { + console.log(error); + }, () => { console.log(`I got something! My pid is ${this.stats.pid}`); console.log(`my table names are:`); diff --git a/assets/env-properties.json b/assets/env-properties.json index 12830ee..125acf2 100644 --- a/assets/env-properties.json +++ b/assets/env-properties.json @@ -54,7 +54,7 @@ "cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=", - "adminToolsAPIURL" :"http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools/", + "adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools/", "adminToolsCommunity" :"openaire",