Revision 52605
Added by Argiro Kokogiannaki over 6 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/connect/connectHelper.ts | ||
---|---|---|
2 | 2 |
|
3 | 3 |
public static getCommunityFromDomain(domain:string):string{ |
4 | 4 |
// domain = "beta.egi.openaire.eu"; for testing |
5 |
if(domain.indexOf("di.uoa.gr")!=-1){
|
|
5 |
if(domain.indexOf("openaire.eu") == -1){
|
|
6 | 6 |
return null; |
7 | 7 |
} |
8 | 8 |
if(domain.indexOf("beta")!=-1){ |
... | ... | |
17 | 17 |
return domain; |
18 | 18 |
} |
19 | 19 |
public static isProduction(domain:string):boolean{ |
20 |
if(domain.indexOf(".di.uoa.gr")!=-1){
|
|
20 |
if(domain.indexOf(".openaire.eu")==-1){
|
|
21 | 21 |
return false; |
22 |
}else if(domain.indexOf(".openaire.eu")!=-1){ |
|
23 |
return true; |
|
24 | 22 |
} |
23 |
return true; |
|
25 | 24 |
} |
26 | 25 |
public static getProductionPrefix(domain:string):string{ |
27 | 26 |
if(domain.indexOf("beta.")!=-1){ |
Also available in: Unified diff
Make domain functions more generic