From b1d4ac46656c391256a8d5591ebea90d9f40e84d Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 10 Oct 2023 17:42:40 +0300 Subject: [PATCH] [Library & Explore | develop]: Added in openaireLibrary environment files for common properties (environment.all.ts: Common properties among all portals, regardless environment, environment.-/test/beta/prod.ts: Common properties per environment among all portals) | environments/: Build and export properties by merging local properties and common properties. --- explore/src/environments/environment.beta.ts | 10 ++++++++-- explore/src/environments/environment.prod.ts | 10 ++++++++-- explore/src/environments/environment.test.ts | 11 +++++++++-- explore/src/environments/environment.ts | 18 ++++++++++++++++-- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/explore/src/environments/environment.beta.ts b/explore/src/environments/environment.beta.ts index df37f765..78c529f4 100644 --- a/explore/src/environments/environment.beta.ts +++ b/explore/src/environments/environment.beta.ts @@ -1,6 +1,8 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; +import {common} from "../app/openaireLibrary/utils/properties/environments/environment.all"; +import {commonBeta} from "../app/openaireLibrary/utils/properties/environments/environment.beta"; -export let properties: EnvProperties = { +let props: EnvProperties = { environment: "beta", adminToolsPortalType: "explore", dashboard: "explore", @@ -33,7 +35,7 @@ export let properties: EnvProperties = { cordisURL: "http://cordis.europa.eu/projects/", openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", r3DataURL: "http://service.re3data.org/repository/", - swhURL: "https://archive.softwareheritage.org/", + // swhURL: "https://archive.softwareheritage.org/", fairSharingURL: "https://fairsharing.org/", eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", sherpaURL: "http://sherpa.ac.uk/romeo/issn/", @@ -128,3 +130,7 @@ export let properties: EnvProperties = { egiNotebookLink: "https://marketplace.eosc-portal.eu/services/egi-notebooks?q=EGI+Notebook" }; + +export let properties: EnvProperties = { + ...props, ...common, ...commonBeta +} diff --git a/explore/src/environments/environment.prod.ts b/explore/src/environments/environment.prod.ts index 9fc2b6c9..2560b132 100644 --- a/explore/src/environments/environment.prod.ts +++ b/explore/src/environments/environment.prod.ts @@ -1,6 +1,8 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; +import {common} from "../app/openaireLibrary/utils/properties/environments/environment.all"; +import {commonProd} from "../app/openaireLibrary/utils/properties/environments/environment.prod"; -export let properties: EnvProperties = { + let props: EnvProperties = { environment: "production", adminToolsPortalType: "explore", dashboard: "explore", @@ -33,7 +35,7 @@ export let properties: EnvProperties = { cordisURL: "http://cordis.europa.eu/projects/", openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", r3DataURL: "http://service.re3data.org/repository/", - swhURL: "https://archive.softwareheritage.org/", + // swhURL: "https://archive.softwareheritage.org/", fairSharingURL: "https://fairsharing.org/", eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", sherpaURL: "http://sherpa.ac.uk/romeo/issn/", @@ -131,3 +133,7 @@ export let properties: EnvProperties = { myOrcidLinksPage: "/my-orcid-links", footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452" }; + +export let properties: EnvProperties = { + ...props, ...common, ...commonProd +} \ No newline at end of file diff --git a/explore/src/environments/environment.test.ts b/explore/src/environments/environment.test.ts index ee69aa9b..6866186d 100644 --- a/explore/src/environments/environment.test.ts +++ b/explore/src/environments/environment.test.ts @@ -1,6 +1,9 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; +import {common} from "../app/openaireLibrary/utils/properties/environments/environment.all"; +import {commonTest} from "../app/openaireLibrary/utils/properties/environments/environment.test"; -export let properties: EnvProperties = { +let props: EnvProperties = { +// export let properties: EnvProperties = { environment: "test", dashboard: "explore", adminToolsPortalType: "explore", @@ -32,7 +35,7 @@ export let properties: EnvProperties = { cordisURL: "http://cordis.europa.eu/projects/", openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", r3DataURL: "http://service.re3data.org/repository/", - swhURL: "https://archive.softwareheritage.org/", + // swhURL: "https://archive.softwareheritage.org/", fairSharingURL: "https://fairsharing.org/", eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", sherpaURL: "http://sherpa.ac.uk/romeo/issn/", @@ -128,3 +131,7 @@ export let properties: EnvProperties = { myOrcidLinksPage: "/my-orcid-links", footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452" }; + +export let properties: EnvProperties = { + ...props, ...common, ...commonTest +} \ No newline at end of file diff --git a/explore/src/environments/environment.ts b/explore/src/environments/environment.ts index 875329e4..95a82a05 100644 --- a/explore/src/environments/environment.ts +++ b/explore/src/environments/environment.ts @@ -4,8 +4,10 @@ // The list of which env maps to which file can be found in `.angular-cli.json`. import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; +import {common} from "../app/openaireLibrary/utils/properties/environments/environment.all"; +import {commonDev} from "../app/openaireLibrary/utils/properties/environments/environment"; -export let properties: EnvProperties = { +let props: EnvProperties = { environment: "development", adminToolsPortalType: "explore", dashboard: "explore", @@ -21,17 +23,22 @@ export let properties: EnvProperties = { useNewStatistisTool: true, claimsAPIURL: "http://rudie.di.uoa.gr:8980/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", // claimsAPIURL: "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", + // From here searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/", searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", + // to here openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports", + // From here searchCrossrefAPIURL: "https://api.crossref.org/works", searchDataciteAPIURL: "https://api.datacite.org/works", searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", + // to here orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/", orcidTokenURL : "https://sandbox.orcid.org/oauth/authorize?", orcidClientId: "APP-A5M3KTX6NCN67L91", + // From here doiURL: "https://doi.org/", pmcURL: "http://europepmc.org/articles/", pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", @@ -39,9 +46,11 @@ export let properties: EnvProperties = { cordisURL: "http://cordis.europa.eu/projects/", openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", r3DataURL: "http://service.re3data.org/repository/", - swhURL: "https://archive.softwareheritage.org/", + // swhURL: "https://archive.softwareheritage.org/", fairSharingURL: "https://fairsharing.org/", + // to here eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", + // From here sherpaURL: "http://sherpa.ac.uk/romeo/issn/", sherpaURLSuffix: "/", zenodo: "https://zenodo.org/", @@ -50,6 +59,7 @@ export let properties: EnvProperties = { fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + // to here helpdesk: "https://www.openaire.eu/support/helpdesk", helpdeskEmail: "helpdesk@openaire.eu", utilsService: "http://dl170.madgik.di.uoa.gr:8000", @@ -134,3 +144,7 @@ export let properties: EnvProperties = { egiNotebookLink: "https://marketplace.eosc-portal.eu/services/egi-notebooks?q=EGI+Notebook" }; + +export let properties: EnvProperties = { + ...props, ...common, ...commonDev +} \ No newline at end of file