From 711697458bff22d1eb6bb8c51cc07648d9fd2675 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 24 Feb 2021 19:49:55 +0000 Subject: [PATCH] [Trunk | Explore]: 1. app.component.ts: Added "My ORCID links" page (/my-orcid-links) only when environment is not production. 2. environment.ts: Added properties "orcidTokenURL", "orcidClientId". 3. environment.test.ts & environment.beta.ts & environment.prod.ts: Added properties "orcidAPIURL", "orcidTokenURL", "orcidClientId". git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@60493 d315682c-612b-4755-9ff5-7f18f6832af3 --- explore/src/app/app.component.ts | 11 +++++++++-- explore/src/environments/environment.beta.ts | 4 +++- explore/src/environments/environment.prod.ts | 4 +++- explore/src/environments/environment.test.ts | 4 +++- explore/src/environments/environment.ts | 2 ++ 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index 3a0d7d2f..81a17d9b 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -48,9 +48,10 @@ export class AppComponent { isClient: boolean = false; clientLoad = 0; - userMenuItems: MenuItem[] = [new MenuItem("", "My profile", "", "", false, [], [], {}), - new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], {})] + userMenuItems: MenuItem[] = []; + // userMenuItems: MenuItem[] = [new MenuItem("", "My profile", "", "", false, [], [], {}), + // new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], {})] menuItems: RootMenuItem [] = []; @@ -64,6 +65,12 @@ export class AppComponent { constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, private router: Router, private userManagementService: UserManagementService, private configurationService: ConfigurationService, private _meta: Meta) { + this.userMenuItems.push(new MenuItem("", "My profile", "", "", false, [], [], {})); + if(properties.environment != "production") { + this.userMenuItems.push(new MenuItem("", "My ORCID links", "", "/my-orcid-links", false, [], [""], {})); + } + this.userMenuItems.push(new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], {})); + this.subscriptions.push(router.events.forEach((event) => { if (event instanceof NavigationStart) { // console.log(event.url); diff --git a/explore/src/environments/environment.beta.ts b/explore/src/environments/environment.beta.ts index 6ea251cf..2c97f7d2 100644 --- a/explore/src/environments/environment.beta.ts +++ b/explore/src/environments/environment.beta.ts @@ -23,7 +23,9 @@ export let properties: EnvProperties = { searchDataciteAPIURL: "https://api.datacite.org/works", searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", - orcidAPIURL: "http://duffy.di.uoa.gr:8080/uoa-orcid-service/orcid/", + orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/", + orcidTokenURL : "https://orcid.org/oauth/authorize?", + orcidClientId: "APP-IN0O56SBVVTB7NN4", doiURL: "https://dx.doi.org/", pmcURL: "http://europepmc.org/articles/", pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", diff --git a/explore/src/environments/environment.prod.ts b/explore/src/environments/environment.prod.ts index f08ad24c..78cf6fc1 100644 --- a/explore/src/environments/environment.prod.ts +++ b/explore/src/environments/environment.prod.ts @@ -23,7 +23,9 @@ export let properties: EnvProperties = { searchDataciteAPIURL: "https://api.datacite.org/works", searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", - orcidAPIURL: "http://duffy.di.uoa.gr:8080/uoa-orcid-service/orcid/", + orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/", + orcidTokenURL : "https://orcid.org/oauth/authorize?", + orcidClientId: "APP-IN0O56SBVVTB7NN4", doiURL: "https://dx.doi.org/", pmcURL: "http://europepmc.org/articles/", pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", diff --git a/explore/src/environments/environment.test.ts b/explore/src/environments/environment.test.ts index 76ddc857..7d80b4a3 100644 --- a/explore/src/environments/environment.test.ts +++ b/explore/src/environments/environment.test.ts @@ -23,7 +23,9 @@ export let properties: EnvProperties = { searchDataciteAPIURL: "https://api.datacite.org/works", searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", - orcidAPIURL: "http://duffy.di.uoa.gr:8080/uoa-orcid-service/orcid/", + orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/", + orcidTokenURL : "https://orcid.org/oauth/authorize?", + orcidClientId: "APP-IN0O56SBVVTB7NN4", doiURL: "https://dx.doi.org/", pmcURL: "http://europepmc.org/articles/", pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", diff --git a/explore/src/environments/environment.ts b/explore/src/environments/environment.ts index cab01641..5048bae5 100644 --- a/explore/src/environments/environment.ts +++ b/explore/src/environments/environment.ts @@ -29,6 +29,8 @@ export let properties: EnvProperties = { searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", orcidAPIURL: "http://duffy.di.uoa.gr:8080/uoa-orcid-service/", + orcidTokenURL : "https://sandbox.orcid.org/oauth/authorize?", + orcidClientId: "APP-A5M3KTX6NCN67L91", doiURL: "https://dx.doi.org/", pmcURL: "http://europepmc.org/articles/", pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/",