diff --git a/connect/community/communityInfo.ts b/connect/community/communityInfo.ts index 7b70f6fa..99ed1c96 100644 --- a/connect/community/communityInfo.ts +++ b/connect/community/communityInfo.ts @@ -14,3 +14,4 @@ export class CommunityInfo { isSubscribed: boolean; isManager: boolean; } +export const prodReadyCommunities = ["dh-ch", "ee", "fam", "mes", "ni", "covid-19", "dariah", "epos", "egi"]; diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts index 14ae122c..bb512017 100644 --- a/searchPages/searchUtils/portal-search-result.component.ts +++ b/searchPages/searchUtils/portal-search-result.component.ts @@ -2,7 +2,7 @@ import {Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild} from '@an import {ErrorCodes} from '../../utils/properties/errorCodes'; import {RouterHelper} from '../../utils/routerHelper.class'; import {EnvProperties} from '../../utils/properties/env-properties'; -import {CommunityInfo} from "../../connect/community/communityInfo"; +import {CommunityInfo, prodReadyCommunities} from "../../connect/community/communityInfo"; import {Router} from "@angular/router"; import {LocalStorageService} from "../../services/localStorage.service"; import {Stakeholder, StakeholderInfo} from "../../monitor/entities/stakeholder"; @@ -46,9 +46,8 @@ export class PortalSearchResultComponent implements OnInit, OnChanges{ console.log(changes); } - getProductionPrefix(): string { - // return (this.properties.environment == "beta") ? "beta." : ""; - return "beta."; + getProductionPrefix(id:string): string { + return (this.properties.environment == "production" && prodReadyCommunities.indexOf(id)!=-1) ? "" : "beta."; } isProduction(): boolean { @@ -80,7 +79,7 @@ export class PortalSearchResultComponent implements OnInit, OnChanges{ public getCommunityPageUrl(communityInfo: CommunityInfo): string { let url = ''; if (this.isProduction()) { - url = 'https://' + this.getProductionPrefix() + communityInfo.communityId + '.openaire.eu'; + url = 'https://' + this.getProductionPrefix(communityInfo.communityId ) + communityInfo.communityId + '.openaire.eu'; } else { url = this.router.createUrlTree(['/'], { queryParams: {'communityId': communityInfo.communityId}