properties have productionMode, minor changes
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47414 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
bb1f291406
commit
b3ab493532
|
@ -1,8 +1,6 @@
|
||||||
import {Component, Input,Output, EventEmitter, ViewChild} from '@angular/core';
|
import {Component, Input,Output, EventEmitter, ViewChild} from '@angular/core';
|
||||||
import {AlertModal} from '../../../utils/modal/alert';
|
import {AlertModal} from '../../../utils/modal/alert';
|
||||||
import {ClaimResult} from '../../claim-utils/claimEntities.class';
|
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 {IMyOptions, IMyDateModel} from '../../../utils/my-date-picker/interfaces/index';
|
||||||
import {Dates} from '../../../utils/string-utils.class';
|
import {Dates} from '../../../utils/string-utils.class';
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ export class DepositBySubjectComponent {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
search(id: string) {
|
search() {
|
||||||
this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "q": this.subjectKeyword } } );
|
this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "q": this.subjectKeyword } } );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,13 @@ import {RouterHelper} from '../../utils/routerHelper.class';
|
||||||
|
|
||||||
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
|
<div class="uk-width-1-1 uk-margin uk-padding uk-panel uk-background-muted">
|
||||||
<form class= "uk-margin uk-text-center uk-margin-top">
|
<form class= "uk-margin uk-text-center uk-margin-top">
|
||||||
<input type="text" [(ngModel)]="subjectKeyword" class=" uk-input uk-width-1-2" name="subject" placeholder="Search for classifications..." />
|
<input type="text" [(ngModel)]="subject" class=" uk-input uk-width-1-2" name="subject" placeholder="Search for classifications..." />
|
||||||
|
|
||||||
<button class=" uk-button uk-button-default" type="submit" (click)="searchDataproviders()" >
|
<button class=" uk-button uk-button-default" type="submit" (click)="searchDataproviders()" >
|
||||||
Search
|
Search
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<div *ngIf="subject.lenght > 0" class=" uk-text-center ">
|
<div *ngIf="subject.length > 0" class=" uk-text-center ">
|
||||||
<span>Keywords: <span><a class="uk-icon-button" (click) = "subject = ''"><span aria-hidden="true" class=" clickable "><span uk-icon="icon: close" class="uk-icon"></span></span></a></span>
|
<span>Keywords: <span><a class="uk-icon-button" (click) = "subject = ''"><span aria-hidden="true" class=" clickable "><span uk-icon="icon: close" class="uk-icon"></span></span></a></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -148,7 +148,7 @@ export class DepositBySubjectResultComponent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private searchDataproviders() {
|
public searchDataproviders() {
|
||||||
this.fetchDataproviders.getResultsBySubjectsForDeposit( (this.subject =="")?"*":this.subject, this.requestFor, this.page, 10);
|
this.fetchDataproviders.getResultsBySubjectsForDeposit( (this.subject =="")?"*":this.subject, this.requestFor, this.page, 10);
|
||||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders();
|
this.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders();
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,11 +131,11 @@
|
||||||
<dt class="title">Download from</dt>
|
<dt class="title">Download from</dt>
|
||||||
<dd class="line"
|
<dd class="line"
|
||||||
*ngFor="let key of datasetInfo.downloadFrom.keys() let i=index" >
|
*ngFor="let key of datasetInfo.downloadFrom.keys() let i=index" >
|
||||||
<span *ngIf="i<5 || showAllDownloadFrom"
|
<div *ngIf="i<5 || showAllDownloadFrom"
|
||||||
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
class="{{datasetInfo.downloadFrom.get(key)['bestAccessMode']}}">
|
||||||
<span class="custom-external custom-icon" data-uk-tooltip="pos:right; delay:10"
|
<span class="custom-external custom-icon" data-uk-tooltip="pos:right; delay:10"
|
||||||
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
|
[title]="datasetInfo.downloadFrom.get(key)['accessMode']">
|
||||||
<div *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
|
<span *ngIf="datasetInfo.downloadFrom.get(key)['url'].length > 1">
|
||||||
{{key}}
|
{{key}}
|
||||||
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
|
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
|
||||||
<a href="{{url}}" target="_blank">
|
<a href="{{url}}" target="_blank">
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
export class OpenaireProperties {
|
export class OpenaireProperties {
|
||||||
|
private static productionMode:boolean = false;
|
||||||
//landing Pages
|
//landing Pages
|
||||||
private static baseSearchLink="/";
|
private static baseSearchLink="/";
|
||||||
private static searchLinkToPublication = "search/publication?articleId=";
|
private static searchLinkToPublication = "search/publication?articleId=";
|
||||||
|
@ -31,23 +32,23 @@ export class OpenaireProperties {
|
||||||
private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/";
|
private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/";
|
||||||
private static framesAPIURL = "https://beta.openaire.eu/stats3/";
|
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 = "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://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_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/";
|
||||||
|
|
||||||
private static searchAPIURLLAst = "https://beta.services.openaire.eu/search/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 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_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 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://search.datacite.org/api";
|
||||||
private static searchDataciteAPIURL = "https://api.datacite.org/works";
|
private static searchDataciteAPIURL = "https://api.datacite.org/works";
|
||||||
|
|
||||||
|
@ -74,7 +75,8 @@ export class OpenaireProperties {
|
||||||
// helpdesk link
|
// helpdesk link
|
||||||
private static helpdesk = "https://www.openaire.eu/support/helpdesk";
|
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/";
|
private static vocabulariesAPI ="https://beta.services.openaire.eu/provision/mvc/vocabularies/";
|
||||||
//landing Pages' getters
|
//landing Pages' getters
|
||||||
|
@ -154,7 +156,12 @@ export class OpenaireProperties {
|
||||||
// }
|
// }
|
||||||
// Services - APIs' getters
|
// Services - APIs' getters
|
||||||
public static getCsvAPIURL(): string {
|
public static getCsvAPIURL(): string {
|
||||||
|
if(this.productionMode){
|
||||||
|
return this.csvAPIURL_pm;
|
||||||
|
}else{
|
||||||
return this.csvAPIURL;
|
return this.csvAPIURL;
|
||||||
|
}
|
||||||
|
// return this.csvAPIURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getFramesAPIURL(): string {
|
public static getFramesAPIURL(): string {
|
||||||
|
@ -166,16 +173,31 @@ export class OpenaireProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getLoginAPIURL(): string {
|
public static getLoginAPIURL(): string {
|
||||||
|
if(this.productionMode){
|
||||||
|
return this.loginAPIURL_pm;
|
||||||
|
}else{
|
||||||
return this.loginAPIURL;
|
return this.loginAPIURL;
|
||||||
|
}
|
||||||
|
// return this.loginAPIURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getSearchAPIURLLast():string{
|
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:
|
//query using full query:
|
||||||
//
|
//
|
||||||
public static getSearchResourcesAPIURL():string{
|
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{
|
public static getSearchAPIURLForEntity(entityType:string):string{
|
||||||
var suffix = "";
|
var suffix = "";
|
||||||
|
@ -192,11 +214,15 @@ export class OpenaireProperties {
|
||||||
}else if(entityType == "person"){
|
}else if(entityType == "person"){
|
||||||
suffix="people/";
|
suffix="people/";
|
||||||
}
|
}
|
||||||
return this.searchAPIURLLAst + suffix;
|
return (this.productionMode?this.searchAPIURLLAst_pm:this.searchAPIURLLAst) + suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static getClaimsAPIURL():string{
|
public static getClaimsAPIURL():string{
|
||||||
return this.claimsAPIURL;
|
if(this.productionMode){
|
||||||
|
return this.claimsAPIURL_pm;
|
||||||
|
}else{
|
||||||
|
return this.claimsAPIURL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static getSearchCrossrefAPIURL():string{
|
public static getSearchCrossrefAPIURL():string{
|
||||||
return this.searchCrossrefAPIURL;
|
return this.searchCrossrefAPIURL;
|
||||||
|
@ -253,7 +279,12 @@ export class OpenaireProperties {
|
||||||
|
|
||||||
//upload service for bulk claim - upload csv file
|
//upload service for bulk claim - upload csv file
|
||||||
public static getUploadServiceUrl():string{
|
public static getUploadServiceUrl():string{
|
||||||
|
if(this.productionMode){
|
||||||
|
return this.uploadService_pm;
|
||||||
|
}else{
|
||||||
return this.uploadService;
|
return this.uploadService;
|
||||||
|
}
|
||||||
|
// return this.uploadService;
|
||||||
}
|
}
|
||||||
//vocabularies API
|
//vocabularies API
|
||||||
public static getVocabulariesAPI():string{
|
public static getVocabulariesAPI():string{
|
||||||
|
|
Loading…
Reference in New Issue