Link to RC dashboards available only for development enviroment

This commit is contained in:
Alex Martzios 2021-10-11 12:53:31 +03:00
parent 9da11820aa
commit 7a375ee6f7
1 changed files with 24 additions and 24 deletions

View File

@ -48,6 +48,7 @@ export class RelatedToComponent {
} }
ngOnInit() { ngOnInit() {
if(properties.environment === "development") {
this.contexts.forEach( context => { this.contexts.forEach( context => {
if(context.idContext) { if(context.idContext) {
this.subscriptions.push( this.subscriptions.push(
@ -55,7 +56,6 @@ export class RelatedToComponent {
//- handling subscribe errors? //- handling subscribe errors?
this.subscriptions.push( this.subscriptions.push(
this.communityService.getCommunity(context.idContext).subscribe( community => { this.communityService.getCommunity(context.idContext).subscribe( community => {
// swap the == of the last condition to != // testing this way for now
if(community && !ConnectHelper.isPrivate(community,user) && (ConnectHelper.getCommunityFromDomain(properties.domain) != context.idContext)) { if(community && !ConnectHelper.isPrivate(community,user) && (ConnectHelper.getCommunityFromDomain(properties.domain) != context.idContext)) {
// creating the link, based on the enviroment // creating the link, based on the enviroment
let url = ''; let url = '';
@ -64,7 +64,6 @@ export class RelatedToComponent {
} else { } else {
url = 'https://' + context.idContext + '.openaire.eu'; url = 'https://' + context.idContext + '.openaire.eu';
} }
console.log(url);
context.link = url; context.link = url;
} }
}) })
@ -74,6 +73,7 @@ export class RelatedToComponent {
} }
}); });
} }
}
ngOnDestroy() { ngOnDestroy() {
this.subscriptions.forEach(subscription => { this.subscriptions.forEach(subscription => {