Link to RC dashboards available only for development enviroment
This commit is contained in:
parent
9da11820aa
commit
7a375ee6f7
|
@ -48,31 +48,31 @@ export class RelatedToComponent {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.contexts.forEach( context => {
|
||||
if(context.idContext) {
|
||||
this.subscriptions.push(
|
||||
this.userManagementService.getUserInfo().subscribe( user => {
|
||||
//- handling subscribe errors?
|
||||
this.subscriptions.push(
|
||||
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)) {
|
||||
// creating the link, based on the enviroment
|
||||
let url = '';
|
||||
if(properties.environment == "beta") {
|
||||
url = 'https://beta.' + context.idContext + '.openaire.eu';
|
||||
} else {
|
||||
url = 'https://' + context.idContext + '.openaire.eu';
|
||||
if(properties.environment === "development") {
|
||||
this.contexts.forEach( context => {
|
||||
if(context.idContext) {
|
||||
this.subscriptions.push(
|
||||
this.userManagementService.getUserInfo().subscribe( user => {
|
||||
//- handling subscribe errors?
|
||||
this.subscriptions.push(
|
||||
this.communityService.getCommunity(context.idContext).subscribe( community => {
|
||||
if(community && !ConnectHelper.isPrivate(community,user) && (ConnectHelper.getCommunityFromDomain(properties.domain) != context.idContext)) {
|
||||
// creating the link, based on the enviroment
|
||||
let url = '';
|
||||
if(properties.environment == "beta") {
|
||||
url = 'https://beta.' + context.idContext + '.openaire.eu';
|
||||
} else {
|
||||
url = 'https://' + context.idContext + '.openaire.eu';
|
||||
}
|
||||
context.link = url;
|
||||
}
|
||||
console.log(url);
|
||||
context.link = url;
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
|
Loading…
Reference in New Issue