2020-06-11 15:53:48 +02:00
|
|
|
export type Environment = "development" | "test" | "beta" | "production";
|
2023-10-30 10:22:20 +01:00
|
|
|
export type Dashboard = "explore" | "connect" | "monitor" | "aggregator" | "eosc" | "developers" | "faircore4eosc";
|
2023-11-13 14:00:05 +01:00
|
|
|
export type PortalType = "explore" | "connect" | "community" | "monitor" | "funder" | "ri" | "project" | "organization" | "aggregator" | "eosc" | "faircore4eosc" | "irish";
|
2020-06-11 15:53:48 +02:00
|
|
|
|
|
|
|
export interface EnvProperties {
|
|
|
|
environment?: Environment;
|
2020-09-24 13:18:24 +02:00
|
|
|
adminToolsPortalType?: PortalType;
|
2020-06-11 15:53:48 +02:00
|
|
|
dashboard?: Dashboard;
|
2020-07-10 10:37:17 +02:00
|
|
|
isDashboard?: boolean;
|
2020-06-11 15:53:48 +02:00
|
|
|
domain?: string;
|
|
|
|
enablePiwikTrack?: boolean;
|
|
|
|
useCache?: boolean;
|
2020-07-13 00:14:50 +02:00
|
|
|
useLongCache?: boolean;
|
2020-06-11 15:53:48 +02:00
|
|
|
showAddThis?: boolean;
|
|
|
|
showContent?: boolean;
|
2022-05-18 12:30:00 +02:00
|
|
|
enableEoscDataTransfer?:boolean;
|
2023-11-10 18:44:15 +01:00
|
|
|
pdfStatisticsAPIURL?: string;
|
2023-11-01 13:26:09 +01:00
|
|
|
statisticsFrameAPIURL?: string; //delete?
|
2020-06-11 15:53:48 +02:00
|
|
|
statisticsFrameNewAPIURL?: string;
|
2023-02-08 10:21:16 +01:00
|
|
|
bipFrameAPIURL?: string;
|
2023-11-01 13:26:09 +01:00
|
|
|
useNewStatistisTool?: boolean; //delete?
|
2021-01-15 13:27:52 +01:00
|
|
|
useOldStatisticsSchema?: boolean;
|
|
|
|
monitorStatsFrameUrl?:string;
|
2020-12-11 11:11:22 +01:00
|
|
|
disableFrameLoad?:boolean
|
2020-06-11 15:53:48 +02:00
|
|
|
statisticsAPIURL?: string;
|
2023-11-01 13:26:09 +01:00
|
|
|
impactFactorsAPIURL?: string; //???
|
2021-04-02 11:17:00 +02:00
|
|
|
enermapsURL?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
claimsAPIURL?: string;
|
|
|
|
searchAPIURLLAst?: string;
|
|
|
|
searchResourcesAPIURL?: string;
|
|
|
|
openCitationsAPIURL?: string;
|
|
|
|
csvAPIURL?: string;
|
|
|
|
searchCrossrefAPIURL?: string;
|
|
|
|
searchDataciteAPIURL?: string;
|
|
|
|
searchOrcidURL?: string;
|
|
|
|
orcidURL?: string;
|
2021-01-13 19:30:25 +01:00
|
|
|
orcidAPIURL?: string;
|
2021-02-24 21:33:37 +01:00
|
|
|
orcidTokenURL?: string;
|
|
|
|
orcidClientId?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
doiURL?: string;
|
|
|
|
pmcURL?: string;
|
|
|
|
pmidURL?: string;
|
|
|
|
handleURL?: string;
|
|
|
|
cordisURL?: string;
|
|
|
|
openDoarURL?: string;
|
|
|
|
r3DataURL?: string;
|
2023-10-06 11:22:00 +02:00
|
|
|
swhURL?: string;
|
2022-05-03 13:22:53 +02:00
|
|
|
fairSharingURL?: string,
|
|
|
|
eoscMarketplaceURL?: string,
|
2020-06-11 15:53:48 +02:00
|
|
|
sherpaURL?: string;
|
|
|
|
sherpaURLSuffix?: string;
|
|
|
|
zenodo?: string;
|
|
|
|
zenodoCommunities?: string;
|
|
|
|
helpdesk?: string;
|
|
|
|
helpdeskEmail?: string;
|
|
|
|
utilsService?: string;
|
|
|
|
vocabulariesAPI?: string;
|
|
|
|
piwikBaseUrl?: string;
|
|
|
|
piwikSiteId?: string;
|
|
|
|
loginUrl?: string;
|
2020-08-06 13:50:08 +02:00
|
|
|
registryUrl?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
logoutUrl?: string;
|
|
|
|
userInfoUrl?: string;
|
2023-07-13 17:39:26 +02:00
|
|
|
developersApiUrl?: string,
|
2020-06-11 15:53:48 +02:00
|
|
|
cookieDomain?: string;
|
|
|
|
feedbackmail?: string;
|
|
|
|
feedbackmailForMissingEntities?: string;
|
|
|
|
cacheUrl?: string;
|
2020-09-24 13:18:24 +02:00
|
|
|
deleteCacheUrl?: string;
|
2022-08-11 11:58:20 +02:00
|
|
|
deleteBrowserCacheUrl?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
monitorServiceAPIURL?: string;
|
|
|
|
adminToolsAPIURL?: string;
|
|
|
|
adminToolsCommunity?: string;
|
2020-11-25 18:12:31 +01:00
|
|
|
useHelpTexts?:boolean;
|
2020-06-11 15:53:48 +02:00
|
|
|
contextsAPI?: string;
|
|
|
|
communityAPI?: string;
|
|
|
|
communitiesAPI?: string;
|
|
|
|
datasourcesAPI?: string;
|
|
|
|
miningBackendURL?: string;
|
|
|
|
csvLimit?: number;
|
|
|
|
pagingLimit?: number;
|
|
|
|
resultsPerPage?: number;
|
|
|
|
baseLink?: string;
|
|
|
|
baseOpenaireLink?: string;
|
|
|
|
afterLoginRedirectLink?: string;
|
2023-12-14 13:00:24 +01:00
|
|
|
myClaimsLink?: string;
|
2020-06-29 15:15:52 +02:00
|
|
|
searchLinkToResult?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToPublication?: string;
|
|
|
|
searchLinkToProject?: string;
|
|
|
|
searchLinkToDataProvider?: string;
|
2022-05-13 14:57:31 +02:00
|
|
|
searchLinkToService?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToDataset?: string;
|
|
|
|
searchLinkToSoftwareLanding?: string;
|
|
|
|
searchLinkToOrp?: string;
|
|
|
|
searchLinkToOrganization?: string;
|
2018-02-05 14:14:59 +01:00
|
|
|
//Search pages
|
2023-04-21 10:04:43 +02:00
|
|
|
searchLinkToAll?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToCommunities?: string;
|
2020-06-29 15:15:52 +02:00
|
|
|
searchLinkToStakeholders?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToPublications?: string;
|
|
|
|
searchLinkToDataProviders?: string;
|
2022-05-13 14:57:31 +02:00
|
|
|
searchLinkToServices?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToProjects?: string;
|
|
|
|
searchLinkToDatasets?: string;
|
|
|
|
searchLinkToSoftware?: string;
|
|
|
|
searchLinkToOrps?: string;
|
|
|
|
searchLinkToOrganizations?: string;
|
|
|
|
searchLinkToCompatibleDataProviders?: string;
|
|
|
|
searchLinkToEntityRegistriesDataProviders?: string;
|
|
|
|
searchLinkToJournals?: string;
|
|
|
|
searchLinkToResults?: string;
|
2018-02-05 14:14:59 +01:00
|
|
|
//Advanced Search for pages
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToAdvancedPublications?: string;
|
|
|
|
searchLinkToAdvancedProjects?: string;
|
|
|
|
searchLinkToAdvancedDatasets?: string;
|
|
|
|
searchLinkToAdvancedSoftware?: string;
|
|
|
|
searchLinkToAdvancedOrps?: string;
|
|
|
|
searchLinkToAdvancedDataProviders?: string;
|
2022-05-13 14:57:31 +02:00
|
|
|
searchLinkToAdvancedServices?: string;
|
2020-06-11 15:53:48 +02:00
|
|
|
searchLinkToAdvancedOrganizations?: string;
|
|
|
|
searchLinkToAdvancedResults?: string;
|
2022-05-11 11:55:14 +02:00
|
|
|
errorLink?: string
|
2020-06-11 15:53:48 +02:00
|
|
|
lastIndexInformationLink?: string;
|
|
|
|
showLastIndexInformationLink?: boolean;
|
|
|
|
widgetLink?: string;
|
|
|
|
claimsInformationLink?: string;
|
|
|
|
depositLearnHowPage?: string;
|
|
|
|
depositSearchPage?: string;
|
|
|
|
shareInZenodoPage?: string;
|
2019-04-10 20:55:17 +02:00
|
|
|
// recaptcha site key
|
2020-06-11 15:53:48 +02:00
|
|
|
reCaptchaSiteKey?: string;
|
2019-04-10 20:55:17 +02:00
|
|
|
// contact us recipients
|
2020-06-11 15:53:48 +02:00
|
|
|
admins?: string[];
|
2023-11-01 13:26:09 +01:00
|
|
|
lastIndexUpdate?: string; //delete?
|
2020-06-11 15:53:48 +02:00
|
|
|
indexInfoAPI?: string;
|
|
|
|
altMetricsAPIURL?: string;
|
2023-11-01 13:26:09 +01:00
|
|
|
b2noteAPIURL?: string; //delete?
|
2020-06-11 15:53:48 +02:00
|
|
|
adminPortalURL?: string;
|
2020-09-15 15:53:18 +02:00
|
|
|
sushiliteURL?: string;
|
2021-02-12 12:31:12 +01:00
|
|
|
notificationsAPIURL?: string;
|
2021-04-16 10:31:05 +02:00
|
|
|
myOrcidLinksPage?: string;
|
2021-05-25 00:15:50 +02:00
|
|
|
footerGrantText?: string;
|
2021-09-27 11:14:17 +02:00
|
|
|
egiNotebookLink?: string;
|
2022-08-01 11:18:47 +02:00
|
|
|
connectPortalUrl?;
|
2022-10-05 15:52:04 +02:00
|
|
|
eoscDataTransferAPI?;
|
2022-11-11 10:20:02 +01:00
|
|
|
eoscDataTransferLoginUrl?;
|
2022-10-05 15:52:04 +02:00
|
|
|
eoscDataTransferDestinations?;
|
2023-05-25 15:37:12 +02:00
|
|
|
hasMachineCache?: boolean;
|
2023-11-28 17:42:21 +01:00
|
|
|
|
|
|
|
// irish
|
|
|
|
logFilesPath?:string;
|
|
|
|
logServiceUrl?:string;
|
2023-12-07 10:36:44 +01:00
|
|
|
zenodoDumpUrl?:string;
|
2018-02-05 14:14:59 +01:00
|
|
|
}
|
2023-11-01 13:26:09 +01:00
|
|
|
|
|
|
|
export function checkPropertyValues(properties:EnvProperties){
|
|
|
|
let keys = Object.keys(properties);
|
|
|
|
let Warn = 0;
|
|
|
|
// console.debug( "Environment: " +properties.environment )
|
|
|
|
for(let attribute of keys){
|
|
|
|
|
|
|
|
// console.debug(attribute + ": " +properties[attribute] + " " )
|
|
|
|
if (properties.environment == "production" && typeof properties[attribute] == 'string' && (properties[attribute].indexOf("beta.") != -1 || properties[attribute].indexOf("uoa.di.gr") != -1)) {
|
|
|
|
console.warn("shouldn't be prod? " + attribute + ": " + properties[attribute]);
|
|
|
|
Warn++;
|
|
|
|
}
|
|
|
|
if (properties.environment != "production" && typeof properties[attribute] == 'string' && properties[attribute].indexOf("https://services.") != -1) {
|
|
|
|
console.warn("should be prod? " + attribute + ": " + properties[attribute]);
|
|
|
|
Warn++;
|
|
|
|
}
|
|
|
|
if (properties.environment != "development" && typeof properties[attribute] == 'string' && properties[attribute].indexOf("uoa.di.gr") != -1) {
|
|
|
|
console.warn("should be in dev? " + attribute + ": " + properties[attribute]);
|
|
|
|
Warn++;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
/*if(Warn > 0){
|
|
|
|
alert("check properties: " + Warn)
|
|
|
|
}*/
|
|
|
|
}
|