diff --git a/src/app/monitor/monitor.component.ts b/src/app/monitor/monitor.component.ts
index 88b07fc..806441f 100644
--- a/src/app/monitor/monitor.component.ts
+++ b/src/app/monitor/monitor.component.ts
@@ -65,7 +65,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
this.status = this.errorCodes.LOADING;
this.numberResults = new Map
();
this.chartsActiveType = new Map();
- this.stakeholderService.getStakeholder(params['stakeholder']).subscribe(stakeholder => {
+ this.stakeholderService.getStakeholder(this.properties.monitorServiceAPIURL, params['stakeholder']).subscribe(stakeholder => {
this.stakeholder = stakeholder;
this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'");
@@ -125,7 +125,11 @@ export class MonitorComponent implements OnInit, OnDestroy {
(category.alias === params['category']) && category.isPublic && category.isActive)[0];
} else {
let category: Category = this.activeTopic.categories[0];
- this.navigateTo(this.stakeholder.alias, this.activeTopic.alias, category.alias);
+ if(category) {
+ this.navigateTo(this.stakeholder.alias, this.activeTopic.alias, category.alias);
+ } else {
+ this.navigateToError();
+ }
return;
}
if (this.activeCategory) {
@@ -152,7 +156,11 @@ export class MonitorComponent implements OnInit, OnDestroy {
} else {
let topic: Topic = this.stakeholder.topics[0];
let category: Category = topic.categories.filter(category => category.isPublic && category.isActive)[0];
- this.navigateTo(this.stakeholder.alias, topic.alias, category.alias);
+ if(topic && category) {
+ this.navigateTo(this.stakeholder.alias, topic.alias, category.alias);
+ } else {
+ this.navigateToError();
+ }
}
}
diff --git a/src/app/services/stakeholder.service.ts b/src/app/services/stakeholder.service.ts
index a795a9d..0c78663 100644
--- a/src/app/services/stakeholder.service.ts
+++ b/src/app/services/stakeholder.service.ts
@@ -14,8 +14,8 @@ export class StakeholderService {
this.stakeholderSubject = new BehaviorSubject(null);
}
- getStakeholder(alias: string): Observable {
- return new BehaviorSubject(Stakeholder.createECStakeholder()).asObservable();
+ getStakeholder(url: string, alias:string): Observable {
+ return this.http.get(url + '/stakeholder/' + alias);
}
getStakeholderAsObservable(): Observable {
diff --git a/src/app/topic/topic.component.html b/src/app/topic/topic.component.html
index c28c6d7..8050f0b 100644
--- a/src/app/topic/topic.component.html
+++ b/src/app/topic/topic.component.html
@@ -1,125 +1,335 @@
-