diff --git a/portal-2/src/app/claims/linking/selected/selectedResults.component.ts b/portal-2/src/app/claims/linking/selected/selectedResults.component.ts index 15b4cfa2..60a5f485 100644 --- a/portal-2/src/app/claims/linking/selected/selectedResults.component.ts +++ b/portal-2/src/app/claims/linking/selected/selectedResults.component.ts @@ -1,8 +1,6 @@ import {Component, Input,Output, EventEmitter, ViewChild} from '@angular/core'; import {AlertModal} from '../../../utils/modal/alert'; import {ClaimResult} from '../../claim-utils/claimEntities.class'; -// import {IMyOptions} from '../../../utils/my-date-picker/interfaces/my-options.interface'; -// import {IMyDateModel} from '../../../utils/my-date-picker/interfaces/my-date-model.interface'; import {IMyOptions, IMyDateModel} from '../../../utils/my-date-picker/interfaces/index'; import {Dates} from '../../../utils/string-utils.class'; diff --git a/portal-2/src/app/deposit/datasets/depositBySubject.component.ts b/portal-2/src/app/deposit/datasets/depositBySubject.component.ts index 083955d1..c1fbae53 100644 --- a/portal-2/src/app/deposit/datasets/depositBySubject.component.ts +++ b/portal-2/src/app/deposit/datasets/depositBySubject.component.ts @@ -42,7 +42,7 @@ export class DepositBySubjectComponent { - search(id: string) { + search() { this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "q": this.subjectKeyword } } ); } diff --git a/portal-2/src/app/deposit/datasets/depositBySubjectResult.component.ts b/portal-2/src/app/deposit/datasets/depositBySubjectResult.component.ts index 675d8130..850f898f 100644 --- a/portal-2/src/app/deposit/datasets/depositBySubjectResult.component.ts +++ b/portal-2/src/app/deposit/datasets/depositBySubjectResult.component.ts @@ -21,13 +21,13 @@ import {RouterHelper} from '../../utils/routerHelper.class';
- +
-
+
Keywords:
@@ -148,7 +148,7 @@ export class DepositBySubjectResultComponent { } } - private searchDataproviders() { + public searchDataproviders() { this.fetchDataproviders.getResultsBySubjectsForDeposit( (this.subject =="")?"*":this.subject, this.requestFor, this.page, 10); this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders(); } diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.html b/portal-2/src/app/landingPages/dataset/dataset.component.html index c8707660..c6d6db47 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.html +++ b/portal-2/src/app/landingPages/dataset/dataset.component.html @@ -131,11 +131,11 @@
Download from
- -
+ {{key}} diff --git a/portal-2/src/app/utils/properties/openaireProperties.ts b/portal-2/src/app/utils/properties/openaireProperties.ts index a2399e6f..23ebf370 100644 --- a/portal-2/src/app/utils/properties/openaireProperties.ts +++ b/portal-2/src/app/utils/properties/openaireProperties.ts @@ -1,4 +1,5 @@ export class OpenaireProperties { + private static productionMode:boolean = false; //landing Pages private static baseSearchLink="/"; private static searchLinkToPublication = "search/publication?articleId="; @@ -31,23 +32,23 @@ export class OpenaireProperties { private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/"; private static framesAPIURL = "https://beta.openaire.eu/stats3/"; -// private static loginAPIURL = "http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates"; private static loginAPIURL = "http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates"; + private static loginAPIURL_pm = "https://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates"; - // private static claimsAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-openaire-connector-service-1.0.0-SNAPSHOT/rest/claimsService/"; - private static claimsAPIURL = "http://beta.services.openaire.eu/claims/rest/claimsService/"; + private static claimsAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-openaire-connector-service-1.0.0-SNAPSHOT/rest/claimsService/"; + private static claimsAPIURL_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/"; - private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/v2/api/"; - // private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; + private static searchAPIURLLAst_pm = "https://beta.services.openaire.eu/search/v2/api/"; + private static searchAPIURLLAst = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/"; - private static searchResourcesAPIURL = "https://beta.services.openaire.eu/search/v2/api/resources"; - // private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; + private static searchResourcesAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/resources"; + private static searchResourcesAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/resources"; - private static searchServiveURL = "http://beta.services.openaire.eu:8480/search/rest/"; - private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv + private static csvAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv + private static csvAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv - private static searchCrossrefAPIURL = "http://api.crossref.org/works"; + private static searchCrossrefAPIURL = "https://api.crossref.org/works"; // private static searchDataciteAPIURL = "https://search.datacite.org/api"; private static searchDataciteAPIURL = "https://api.datacite.org/works"; @@ -74,7 +75,8 @@ export class OpenaireProperties { // helpdesk link private static helpdesk = "https://www.openaire.eu/support/helpdesk"; - private static uploadService = "http://localhost:8000/upload"; + private static uploadService_pm = "https://demo.openaire.eu/upload"; + private static uploadService = "http://scoobydoo.di.uoa.gr:8000/upload"; private static vocabulariesAPI ="https://beta.services.openaire.eu/provision/mvc/vocabularies/"; //landing Pages' getters @@ -154,7 +156,12 @@ export class OpenaireProperties { // } // Services - APIs' getters public static getCsvAPIURL(): string { + if(this.productionMode){ + return this.csvAPIURL_pm; + }else{ return this.csvAPIURL; + } + // return this.csvAPIURL; } public static getFramesAPIURL(): string { @@ -166,16 +173,31 @@ export class OpenaireProperties { } public static getLoginAPIURL(): string { + if(this.productionMode){ + return this.loginAPIURL_pm; + }else{ return this.loginAPIURL; + } + // return this.loginAPIURL; } public static getSearchAPIURLLast():string{ - return this.searchAPIURLLAst; + if(this.productionMode){ + return this.searchAPIURLLAst_pm; + }else{ + return this.searchAPIURLLAst; + } + // return this.searchAPIURLLAst; } //query using full query: // public static getSearchResourcesAPIURL():string{ - return this.searchResourcesAPIURL; + if(this.productionMode){ + return this.searchResourcesAPIURL_pm; + }else{ + return this.searchResourcesAPIURL; + } + // return this.searchResourcesAPIURL; } public static getSearchAPIURLForEntity(entityType:string):string{ var suffix = ""; @@ -192,11 +214,15 @@ export class OpenaireProperties { }else if(entityType == "person"){ suffix="people/"; } - return this.searchAPIURLLAst + suffix; + return (this.productionMode?this.searchAPIURLLAst_pm:this.searchAPIURLLAst) + suffix; } public static getClaimsAPIURL():string{ - return this.claimsAPIURL; + if(this.productionMode){ + return this.claimsAPIURL_pm; + }else{ + return this.claimsAPIURL; + } } public static getSearchCrossrefAPIURL():string{ return this.searchCrossrefAPIURL; @@ -253,7 +279,12 @@ export class OpenaireProperties { //upload service for bulk claim - upload csv file public static getUploadServiceUrl():string{ + if(this.productionMode){ + return this.uploadService_pm; + }else{ return this.uploadService; + } + // return this.uploadService; } //vocabularies API public static getVocabulariesAPI():string{