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:
argiro.kokogiannaki 2017-05-31 12:03:33 +00:00
parent bb1f291406
commit b3ab493532
5 changed files with 52 additions and 23 deletions

View File

@ -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';

View File

@ -42,7 +42,7 @@ export class DepositBySubjectComponent {
search(id: string) {
search() {
this._router.navigate( ['participate/deposit-subject-result'], { queryParams: { "q": this.subjectKeyword } } );
}

View File

@ -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">
<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()" >
Search
</button>
</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>
</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.linkToSearchDataproviders = OpenaireProperties.getLinkToSearchDataProviders();
}

View File

@ -131,11 +131,11 @@
<dt class="title">Download from</dt>
<dd class="line"
*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']}}">
<span class="custom-external custom-icon" data-uk-tooltip="pos:right; delay:10"
[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}}
<span *ngFor="let url of datasetInfo.downloadFrom.get(key)['url']; let i=index;">
<a href="{{url}}" target="_blank">

View File

@ -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{