From a1b3a40426caaefd1dff9d949f1b685e44ea9c5f Mon Sep 17 00:00:00 2001 From: Konstantinos Triantafyllou Date: Tue, 5 Nov 2019 14:59:06 +0000 Subject: [PATCH] [Monitor Dashboard]: Add Topic page git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@57514 d315682c-612b-4755-9ff5-7f18f6832af3 --- deploy/beta-properties.json | 1 + deploy/production-properties.json | 2 + src/app/app.component.ts | 40 +- src/app/error/errorPage.component.ts | 12 +- src/app/home/home.component.html | 12 +- src/app/home/home.component.ts | 3 +- .../sidebar/sideBar.service.ts | 4 +- src/app/login/user.component.ts | 2 +- src/app/monitor/monitor.component.html | 4 +- src/app/monitor/monitor.component.ts | 14 +- src/app/services/stakeholder.service.ts | 4 +- src/app/topic/topic.component.html | 418 +++++++++++++----- src/app/topic/topic.component.ts | 145 +++++- src/app/utils/Tools.ts | 6 + src/assets/env-properties.json | 2 + src/assets/monitor-custom.css | 8 + 16 files changed, 514 insertions(+), 163 deletions(-) create mode 100644 src/app/utils/Tools.ts diff --git a/deploy/beta-properties.json b/deploy/beta-properties.json index 0d9a46d..16e4cd4 100644 --- a/deploy/beta-properties.json +++ b/deploy/beta-properties.json @@ -46,6 +46,7 @@ "cacheUrl" :"https://demo.openaire.eu/cache/get?url=", + "monitorServiceAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-monitor-service", "adminToolsAPIURL" :"https://beta.services.openaire.eu/uoa-admin-tools", diff --git a/deploy/production-properties.json b/deploy/production-properties.json index f8c4f3b..cf6ac41 100644 --- a/deploy/production-properties.json +++ b/deploy/production-properties.json @@ -48,6 +48,8 @@ "datasourcesAPI": "https://services.openaire.eu/openaire/ds/search/", + "monitorServiceAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-monitor-service", + "adminToolsAPIURL" :"https://services.openaire.eu/uoa-admin-tools/", "adminToolsCommunity" :"connect", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 81c0870..9918756 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -28,29 +28,29 @@ export class AppComponent { } ngOnInit() { - this.router.events.forEach((event) => { - if (event instanceof NavigationEnd) { - let r = this.route; - while (r.firstChild) { - r = r.firstChild; - } - r.params.subscribe(params => { - if(params['stakeholder']) { - if(!this.stakeholderService.stakeholder || - this.stakeholderService.stakeholder.alias !== params['stakeholder']) { - this.stakeholderService.getStakeholder(params['stakeholder']).subscribe(stakeholder => { - this.stakeholderService.setStakeholder(stakeholder); - }); - } - } else { - this.stakeholderService.setStakeholder(null); - } - }); - } - }); this.propertiesService.loadEnvironment() .then(properties => { this.properties = properties; + this.router.events.forEach((event) => { + if (event instanceof NavigationEnd) { + let r = this.route; + while (r.firstChild) { + r = r.firstChild; + } + r.params.subscribe(params => { + if(params['stakeholder']) { + if(!this.stakeholderService.stakeholder || + this.stakeholderService.stakeholder.alias !== params['stakeholder']) { + this.stakeholderService.getStakeholder(this.properties.monitorServiceAPIURL, params['stakeholder']).subscribe(stakeholder => { + this.stakeholderService.setStakeholder(stakeholder); + }); + } + } else { + this.stakeholderService.setStakeholder(null); + } + }); + } + }); this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => { this.user = user; this.loginCheck = true; diff --git a/src/app/error/errorPage.component.ts b/src/app/error/errorPage.component.ts index e96d3dc..71e252c 100644 --- a/src/app/error/errorPage.component.ts +++ b/src/app/error/errorPage.component.ts @@ -1,13 +1,17 @@ -import { Component, Input } from '@angular/core'; -import { Location } from '@angular/common'; - +import {Component, OnInit} from '@angular/core'; +import {SideBarService} from "../library/sharedComponents/sidebar/sideBar.service"; + @Component({ selector: 'openaire-error', template: ` ` }) +export class OpenaireErrorPageComponent implements OnInit{ -export class OpenaireErrorPageComponent { + constructor(private sidebarService: SideBarService) {} + ngOnInit(): void { + this.sidebarService.setHasSidebar(false); + } } diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index c28c6d7..03acc34 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,12 +1,12 @@ -