Project

General

Profile

« Previous | Next » 

Revision 59028

[Library|Trunk]
communities:
add const prodReadyCommunities
communities search results: in production show link to beta or prod based on the list of prodReadyCommunities

View differences:

modules/uoa-services-library/trunk/ng-openaire-library/src/app/searchPages/searchUtils/portal-search-result.component.ts
2 2
import {ErrorCodes} from '../../utils/properties/errorCodes';
3 3
import {RouterHelper} from '../../utils/routerHelper.class';
4 4
import {EnvProperties} from '../../utils/properties/env-properties';
5
import {CommunityInfo} from "../../connect/community/communityInfo";
5
import {CommunityInfo, prodReadyCommunities} from "../../connect/community/communityInfo";
6 6
import {Router} from "@angular/router";
7 7
import {LocalStorageService} from "../../services/localStorage.service";
8 8
import {Stakeholder, StakeholderInfo} from "../../monitor/entities/stakeholder";
......
46 46
    console.log(changes);
47 47
  }
48 48
  
49
  getProductionPrefix(): string {
50
    // return (this.properties.environment == "beta") ? "beta." : "";
51
    return "beta.";
49
  getProductionPrefix(id:string): string {
50
    return (this.properties.environment == "production" &&  prodReadyCommunities.indexOf(id)!=-1) ? "" : "beta.";
52 51
  }
53 52
  
54 53
  isProduction(): boolean {
......
80 79
  public getCommunityPageUrl(communityInfo: CommunityInfo): string {
81 80
    let url = '';
82 81
    if (this.isProduction()) {
83
      url = 'https://' + this.getProductionPrefix() + communityInfo.communityId + '.openaire.eu';
82
      url = 'https://' + this.getProductionPrefix(communityInfo.communityId ) + communityInfo.communityId + '.openaire.eu';
84 83
    } else {
85 84
      url = this.router.createUrlTree(['/'], {
86 85
        queryParams: {'communityId': communityInfo.communityId}
modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/community/communityInfo.ts
14 14
  isSubscribed: boolean;
15 15
  isManager: boolean;
16 16
}
17
export const prodReadyCommunities = ["dh-ch", "ee", "fam", "mes", "ni", "covid-19", "dariah", "epos", "egi"];

Also available in: Unified diff