USe a json file to read properties | replace openaire Properties

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@50587 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-02-05 13:16:11 +00:00
parent 6a5911c5f0
commit beb3527ec2
42 changed files with 373 additions and 673 deletions

View File

@ -0,0 +1,60 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {EnvironmentSpecificResolver, EnvironmentSpecificService} from 'ng-openaire-library';
import {NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, ErrorModule} from 'ng-openaire-library';
import { OpenaireErrorPageComponent } from './error/errorPage.component';
const routes: Routes = [
{ path: '', loadChildren: './home/home.module#HomeModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'home', loadChildren: './home/home.module#HomeModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/project', loadChildren: './landingPages/project/libProject.module#LibProjectModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/dataprovider', loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/deposit-datasets', loadChildren: './deposit/datasets/depositDatasets.module#LibDepositDatasetsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/deposit-datasets-result', loadChildren: './deposit/datasets/depositDatasetsResults.module#LibDepositDatasetsResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/deposit-subject-result', loadChildren: './deposit/datasets/depositBySubjectResults.module#LibDepositBySubjectResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/deposit-publications', loadChildren: './deposit/publications/depositPublications.module#LibDepositPublicationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/deposit-publications-result', loadChildren: './deposit/publications/depositPublicationsResults.module#LibDepositPublicationsResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find', loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/publications', loadChildren: './searchPages/simple/searchPublications.module#LibSearchPublicationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/datasets', loadChildren: './searchPages/simple/searchDatasets.module#LibSearchDatasetsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/software', loadChildren: './searchPages/simple/searchSoftware.module#LibSearchSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/projects', loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/content-providers', loadChildren: './searchPages/dataProviders/compatibleDataProviders.module#LibCompatibleDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/content-providers-table', loadChildren: './searchPages/dataProviders/compatibleDataProvidersTable.module#CompatibleDataProvidersTableModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/entity-registries', loadChildren: './searchPages/dataProviders/entityRegistries.module#LibEntityRegistriesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/entity-registries-table', loadChildren: './searchPages/dataProviders/entityRegistriesTable.module#EntityRegistriesTableModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/journals', loadChildren: './searchPages/dataProviders/journals.module#LibJournalsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/journals-table', loadChildren: './searchPages/dataProviders/journalsTable.module#JournalsTableModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/publications', loadChildren: './searchPages/advanced/advancedSearchPublications.module#LibAdvancedSearchPublicationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/datasets', loadChildren: './searchPages/advanced/advancedSearchDatasets.module#LibAdvancedSearchDatasetsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/software', loadChildren: './searchPages/advanced/advancedSearchSoftware.module#LibAdvancedSearchSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/organizations', loadChildren: './searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/dataproviders', loadChildren: './searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/advanced/projects', loadChildren: './searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'project-report', loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'claims', loadChildren: './claims/claimsAdmin/claimsAdmin.module#LibClaimsAdminModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/claim', loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'participate/direct-claim', loadChildren: './claims/directLinking/directLinking.module#LibDirectLinkingModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'claims-project-manager', loadChildren: './claims/claimsByToken/claimsByToken.module#LibClaimsByTokenModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'user-info', loadChildren: './login/libUser.module#LibUserModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'error', component: OpenaireErrorPageComponent, resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent, resolve: { envSpecific: EnvironmentSpecificResolver }}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
})
export class AppRoutingModule { }

View File

@ -1,6 +1,10 @@
import { Component, Directive, ElementRef, Renderer, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
import {Observable} from 'rxjs/Observable';
import { OpenaireProperties} from './utils/openaireProperties';
import {ActivatedRoute} from '@angular/router';
import {MenuItem, RootMenuItem, EnvironmentSpecificService, EnvProperties} from 'ng-openaire-library';
@Component({
//changeDetection: ChangeDetectionStrategy.Default,
//encapsulation: ViewEncapsulation.Emulated,
@ -9,13 +13,14 @@ import { OpenaireProperties} from './utils/openaireProperties';
`],
template: `
<navbar portal="explore" onlyTop=false [userMenuItems]=userMenuItems [menuItems]=menuItems [logInUrl]=logInUrl [logOutUrl]=logOutUrl></navbar>
<navbar *ngIf= "properties" portal="explore" onlyTop=false [(communityId)]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems
[(APIUrl)]="properties.adminToolsAPIURL" [(logInUrl)]="properties.loginUrl" [(logOutUrl)]="properties.logoutUrl" [(cookieDomain)]="properties.cookieDomain"></navbar>
<div class="custom-main-content" >
<main>
<router-outlet></router-outlet>
</main>
</div>
<feedback *ngIf= "isClient" portalName="Explore" [feedbackmail]=feedbackmail></feedback>
<feedback *ngIf= "isClient && properties" portalName="Explore" [feedbackmail]=feedbackmail></feedback>
<cookie-law *ngIf= "isClient" position="bottom">
OpenAIRE uses cookies in order to function properly.<br>
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
@ -30,137 +35,46 @@ import { OpenaireProperties} from './utils/openaireProperties';
})
export class AppComponent {
isClient:boolean = false;
feedbackmail:string = OpenaireProperties.getFeedbackMail();
userMenuItems = [
{title: "My profile",
url:"",
route:"",
needsAuthorization:false},
{title: "My claims",
url:"",
route:"/myclaims",
needsAuthorization:false},
{title: "Manage all claims",
url:"",
route:"/claims",
needsAuthorization:true
}
];
menuItems = [
{rootItem:{
id:"search",
title: "Search",
url:"",
route:"/search/find"
},items:[
{title: "Publications",
url:"",
route:"/search/find/publications",
entitiesRequired:["publication"],
routeRequired:["/search/find/publications"]},
{title: "Research Data",
url:"",
route:"/search/find/datasets",
entitiesRequired:["dataset"],
routeRequired:["/search/find/datasets"]},
{title: "Software",
url:"",
route:"/search/find/software",
entitiesRequired:["software"],
routeRequired:["/search/find/software"]},
{title: "Projects",
url:"",
route:"/search/find/projects",
entitiesRequired:["projects"],
routeRequired:["/search/find/projects"]},
{title: "Content Providers",
url:"",
route:"/search/find/dataproviders",
entitiesRequired:["projects"],
routeRequired:["/search/find/projects"]},
{title: "Organizations",
url:"",
route:"/search/find/organizations",
entitiesRequired:["projects"],
routeRequired:["/search/find/projects"]},
]
},
{rootItem:{
id:"share",
title: "Share",
url:"",
route:""
},items:[
{title: "Publications",
url:"",
route:"/participate/deposit-publications",
entitiesRequired:["publication"],
routeRequired:["/participate/deposit-publications"]},
{title: "Research Data",
url:"",
route:"/participate/deposit-datasets",
entitiesRequired:["dataset"],
routeRequired:["/participate/deposit-datasets"]}
]
},
{rootItem:{
id:"link",
title: "Link",
url:"",
route:"/participate/claim",
entitiesRequired:[],
routeRequired:["/participate/claim"]
},items:[]
},
userMenuItems:MenuItem[] = [ new MenuItem("","My profile","","",false,[],[],{}),
new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}),
new MenuItem("","Manage all claims","","/claims",true,[],["/claims"],{})]
{rootItem:{
id:"dataproviders",
title: "Content Providers",
url:"",
route:""
menuItems:RootMenuItem [] = [
{rootItem: new MenuItem("search","Search","","/search/find",false,[],["/search/find"],{}),
items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],{}),
new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],{}),
new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],{}),
new MenuItem("","Projects","","/search/find/projects/",false,["project"],["/search/find/projects"],{}),
new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],{}),
new MenuItem("","Organizations","","/search/find/organizations/",false,["organization"],["/search/find/organizations"],{})
]},
{
rootItem: new MenuItem("share","Share","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets"],{}),
items: [new MenuItem("","Publications","","/participate/deposit-publications",false,["publication"],["/participate/deposit-publications"],{}),
new MenuItem("","Research Data","","/participate/deposit-datasets",false,["dataset"],["/participate/deposit-datasets"],{})]
},
{
rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],{}),
items: []
},
{
rootItem: new MenuItem("datasources","Content Providers","","",false,["datasource"],[],{}),
items: [new MenuItem("","Data Policies","https://beta.openaire.eu/oa-policies-mandates","",false,["datasource"],[""],{}),
new MenuItem("","Repositories","","/search/content-providers",false,["datasource"],["/search/content-providers"],{}),
new MenuItem("","Journals","","/search/journals",false,["datasource"],["/search/journals"],{}),
new MenuItem("","Registries","","/search/entity-registries",false,["datasource"],["/search/entity-registries"],{}),
new MenuItem("","Browse all","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],{})]
}
];
feedbackmail:string
properties:EnvProperties;
constructor( private route: ActivatedRoute, private propertiesService:EnvironmentSpecificService) {
}
},items:[
{title: "Data Policies",
url:"https://beta.openaire.eu/oa-policies-mandates",
route:"",
entitiesRequired:[],
routeRequired:[]},
{title: "Repositories",
url:"",
route:"/search/content-providers",
entitiesRequired:[],
routeRequired:["/search/content-providers"]},
{title: "Journals",
url:"",
route:"/search/journals",
entitiesRequired:[],
routeRequired:["/search/journals"]},
{title: "Registries",
url:"",
route:"/search/entity-registries",
entitiesRequired:[],
routeRequired:["/search/entity-registries"]},
{title: "Browse all",
url:"",
route:"/search/find/dataproviders",
entitiesRequired:[],
routeRequired:["/search/find/dataproviders"]}
]
}
];
logInUrl = OpenaireProperties.getLoginURL();
logOutUrl = OpenaireProperties.getLogoutURL();
ngOnInit() {
if (typeof document !== 'undefined') {
@ -168,6 +82,17 @@ export class AppComponent {
this.isClient = true;
}catch (e) {
}
}
this.propertiesService.loadEnvironment()
.then(es => {
this.propertiesService.setEnvProperties(es);
this.properties = this.propertiesService.envSpecific;
this.feedbackmail = this.properties.feedbackmail;
}, error => {
console.log("App couldn't fetch properties");
console.log(error);
});
}
}

View File

@ -8,9 +8,10 @@ import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import {NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, ErrorModule} from 'ng-openaire-library';
import {NavigationBarModule, FeedbackModule, BottomModule, CookieLawModule, ErrorModule, EnvironmentSpecificResolver} from 'ng-openaire-library';
import { OpenaireErrorPageComponent } from './error/errorPage.component';
import { AppRoutingModule } from './app-routing.module';
@NgModule({
@ -23,54 +24,11 @@ ErrorModule,
NavigationBarModule, FeedbackModule, BottomModule,
CookieLawModule,
BrowserModule.withServerTransition({appId: 'my-app'}),
RouterModule.forRoot([
{ path: '', loadChildren: './home/home.module#HomeModule'},
{ path: 'home', loadChildren: './home/home.module#HomeModule'},
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule' },
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule' },
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule' },
{ path: 'search/project', loadChildren: './landingPages/project/libProject.module#LibProjectModule' },
{ path: 'search/dataprovider', loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule' },
{ path: 'search/organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule' },
{ path: 'participate/deposit-datasets', loadChildren: './deposit/datasets/depositDatasets.module#LibDepositDatasetsModule' },
{ path: 'participate/deposit-datasets-result', loadChildren: './deposit/datasets/depositDatasetsResults.module#LibDepositDatasetsResultsModule' },
{ path: 'participate/deposit-subject-result', loadChildren: './deposit/datasets/depositBySubjectResults.module#LibDepositBySubjectResultsModule' },
{ path: 'participate/deposit-publications', loadChildren: './deposit/publications/depositPublications.module#LibDepositPublicationsModule' },
{ path: 'participate/deposit-publications-result', loadChildren: './deposit/publications/depositPublicationsResults.module#LibDepositPublicationsResultsModule' },
{ path: 'search/find', loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule' },
{ path: 'search/find/publications', loadChildren: './searchPages/simple/searchPublications.module#LibSearchPublicationsModule' },
{ path: 'search/find/datasets', loadChildren: './searchPages/simple/searchDatasets.module#LibSearchDatasetsModule' },
{ path: 'search/find/software', loadChildren: './searchPages/simple/searchSoftware.module#LibSearchSoftwareModule' },
{ path: 'search/find/projects', loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule' },
{ path: 'search/find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule' },
{ path: 'search/find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule' },
{ path: 'search/content-providers', loadChildren: './searchPages/dataProviders/compatibleDataProviders.module#LibCompatibleDataProvidersModule' },
{ path: 'search/content-providers-table', loadChildren: './searchPages/dataProviders/compatibleDataProvidersTable.module#CompatibleDataProvidersTableModule' },
{ path: 'search/entity-registries', loadChildren: './searchPages/dataProviders/entityRegistries.module#LibEntityRegistriesModule' },
{ path: 'search/entity-registries-table', loadChildren: './searchPages/dataProviders/entityRegistriesTable.module#EntityRegistriesTableModule' },
{ path: 'search/journals', loadChildren: './searchPages/dataProviders/journals.module#LibJournalsModule' },
{ path: 'search/journals-table', loadChildren: './searchPages/dataProviders/journalsTable.module#JournalsTableModule' },
{ path: 'search/advanced/publications', loadChildren: './searchPages/advanced/advancedSearchPublications.module#LibAdvancedSearchPublicationsModule' },
{ path: 'search/advanced/datasets', loadChildren: './searchPages/advanced/advancedSearchDatasets.module#LibAdvancedSearchDatasetsModule' },
{ path: 'search/advanced/software', loadChildren: './searchPages/advanced/advancedSearchSoftware.module#LibAdvancedSearchSoftwareModule' },
{ path: 'search/advanced/organizations', loadChildren: './searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule' },
{ path: 'search/advanced/dataproviders', loadChildren: './searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule' },
{ path: 'search/advanced/projects', loadChildren: './searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule' },
{ path: 'project-report', loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule' },
{ path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule' },
{ path: 'claims', loadChildren: './claims/claimsAdmin/claimsAdmin.module#LibClaimsAdminModule' },
{ path: 'participate/claim', loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule' },
{ path: 'participate/direct-claim', loadChildren: './claims/directLinking/directLinking.module#LibDirectLinkingModule' },
{ path: 'claims-project-manager', loadChildren: './claims/claimsByToken/claimsByToken.module#LibClaimsByTokenModule' },
{ path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule' },
{ path: 'user-info', loadChildren: './login/libUser.module#LibUserModule' },
{ path: 'error', component: OpenaireErrorPageComponent },
{ path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent }
]),
AppRoutingModule
],
declarations: [ AppComponent, OpenaireErrorPageComponent],
exports: [ AppComponent ],
providers:[ ],
providers:[EnvironmentSpecificResolver ],
bootstrap: [AppComponent]
})
//

View File

@ -2,13 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireClaimsAdminComponent } from './claimsAdmin.component';
import{ PreviousRouteRecorder, IsRouteEnabled ,AdminLoginGuard} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireClaimsAdminComponent, canActivate: [IsRouteEnabled, AdminLoginGuard],
data: {redirect: '/error'}, canDeactivate: [PreviousRouteRecorder]}])
data: {redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity}, canDeactivate: [PreviousRouteRecorder]}])
]
})
export class ClaimsAdminRoutingModule { }

View File

@ -2,12 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireClaimsByTokenComponent } from './claimsByToken.component';
import{ PreviousRouteRecorder, IsRouteEnabled ,LoginGuard} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireClaimsByTokenComponent, canActivate: [IsRouteEnabled, LoginGuard],
data: {redirect: '/error'}, canDeactivate: [PreviousRouteRecorder]}])
data: {redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity}, canDeactivate: [PreviousRouteRecorder]}])
]
})
export class ClaimsByTokenRoutingModule { }

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireDirectLinkingComponent } from './directLinking.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDirectLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder]},
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireLinkingComponent } from './linkingGeneric.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireLinkingComponent, canActivate: [IsRouteEnabled, LoginGuard], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder]},
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import {OpenaireMyClaimsComponent } from './myClaims.component';
import{ PreviousRouteRecorder, IsRouteEnabled, LoginGuard} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireMyClaimsComponent, canActivate: [IsRouteEnabled, LoginGuard],
data: {redirect: '/error'}, canDeactivate: [PreviousRouteRecorder]}])
data: {redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity}, canDeactivate: [PreviousRouteRecorder]}])
]
})
export class MyClaimsRoutingModule { }

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireDepositBySubjectResultComponent } from './depositBySubjectResult.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDepositBySubjectResultComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireDepositDatasetsComponent } from './depositDatasets.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDepositDatasetsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -2,12 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireDepositDatasetsResultComponent } from './depositDatasetsResult.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDepositDatasetsResultComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -2,12 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireDepositPublicationsComponent } from './depositPublications.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDepositPublicationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -2,12 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireDepositPublicationsResultComponent } from './depositPublicationsResult.component';
import { FreeGuard,PreviousRouteRecorder,IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDepositPublicationsResultComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -5,8 +5,9 @@ import {Location} from '@angular/common';
import "rxjs/add/observable/zip";
import { Meta, MetaDefinition, ConfigurationService} from 'ng-openaire-library';
import {SearchPublicationsService, SearchDataprovidersService, SearchProjectsService, SearchDatasetsService, SearchOrganizationsService, OpenaireProperties, SearchFields} from 'ng-openaire-library';
import {SearchPublicationsService, SearchDataprovidersService, SearchProjectsService, SearchDatasetsService, SearchOrganizationsService, SearchFields} from 'ng-openaire-library';
import { ErrorCodes, RouterHelper, NumberUtils, RefineFieldResultsService, PiwikService} from 'ng-openaire-library';
import{EnvProperties} from 'ng-openaire-library';
@Component({
@ -34,7 +35,7 @@ export class HomeComponent {
showDatasets:boolean= false;
showProjects:boolean= false;
showDataProviders:boolean= false;
properties: EnvProperties;
public subPub;public subData;public subProjects;public subOrg; public subDataPr;
constructor (
@ -54,34 +55,40 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
var title = "OpenAIRE";
var url = OpenaireProperties.getBaseLink()+this._router.url;
this._meta.setTitle(title);
this._meta.updateMeta("description", description);
this._meta.updateProperty("og:description", description);
this._meta.updateProperty("og:title", title);
this._meta.updateProperty("og:url", url);
const entityOne = this.config.isEntityEnabled("publication");
const entityTwo = this.config.isEntityEnabled("dataset");
const entityThree = this.config.isEntityEnabled("project");
const entityFour = this.config.isEntityEnabled("datasource");
const example = Observable.zip(entityOne,entityTwo,entityThree,entityFour);
// wait until all observables have emitted a value then emit all as an array
example.subscribe(data => {
this.showPublications = data[0];
this.showDatasets = data[1];
this.showProjects = data[2];
this.showDataProviders = data[3];
this.getNumbers();
});
if(OpenaireProperties.isPiwikTrackEnabled() && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("OpenAIRE").subscribe();
}
}
public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if(this.properties!=null){
var url = this.properties.baseLink+this._router.url;
this._meta.updateProperty("og:url", url);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView("OpenAIRE").subscribe();
}
this.config.getCommunityInformation(this.properties.adminToolsAPIURL, this.properties.adminToolsCommunity ).subscribe(data => {
var showEntity = {};
for(var i=0; i< data.entities.length; i++){
showEntity[""+data.entities[i]["pid"]+""] = data.entities[i]["isEnabled"];
}
this.showPublications = showEntity["publication"];
this.showDatasets = showEntity["dataset"];
this.showProjects = showEntity["project"];
this.showDataProviders = showEntity["datasource"];
this.getNumbers();
});
}
});
}
public ngOnDestroy() {
if(this.piwiksub){
@ -110,12 +117,10 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
private getNumbers() {
if(this.showPublications){
this.subPub = this._searchPublicationsService.numOfSearchPublications("").subscribe(
this.subPub = this._searchPublicationsService.numOfSearchPublications("", this.properties).subscribe(
data => {
console.log("Count results: "+data);
if(data && data != null && data > 0 ){
this.publicationsSize = NumberUtils.roundNumber(data);
console.log("After round");
}
},
@ -125,7 +130,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
);
}
if(this.showDatasets){
this.subData = this._searchDatasetsService.numOfSearchDatasets("").subscribe(
this.subData = this._searchDatasetsService.numOfSearchDatasets("", this.properties).subscribe(
data => {
if(data && data != null && data > 0 ){
this.datasetsSize = NumberUtils.roundNumber(data);
@ -137,11 +142,9 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
);
}
if(this.showProjects){
this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project").subscribe(
this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project", this.properties).subscribe(
data => {
console.info("Funders: "+data[1][0].title+ " values "+data[1][0].values.length+"]");
console.info("Projects: "+data[0]);
if(data[0] && data[0] > 0 ){
this.projectsSize = NumberUtils.roundNumber(data[0]);
@ -156,7 +159,7 @@ public subPub;public subData;public subProjects;public subOrg; public subDataPr;
});
}
if(this.showDataProviders){
this.subDataPr = this._searchDataprovidersService.numOfSearchDataproviders("").subscribe(
this.subDataPr = this._searchDataprovidersService.numOfSearchDataproviders("", this.properties).subscribe(
data => {
if(data && data != null && data > 0 ){
this.datasourcesSize = NumberUtils.roundNumber(data);

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireDataProviderComponent } from './dataProvider.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDataProviderComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireDatasetComponent } from './dataset.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireDatasetComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -3,13 +3,14 @@ import { RouterModule } from '@angular/router';
import { OpenaireOrganizationComponent } from './organization.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireOrganizationComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import { OpenaireProjectComponent } from './project.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireProjectComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import {OpenairePublicationComponent } from './publication.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenairePublicationComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -2,13 +2,14 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchDataProvidersComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchDatasetsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchOrganizationsComponent , canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
},canDeactivate: [PreviousRouteRecorder]}
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchProjectsComponent} from './advancedSearchProjects.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchProjectsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchPublicationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchCompatibleDataprovidersComponent} from './compatibleDataProviders.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchCompatibleDataprovidersComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{SearchCompatibleDataprovidersTableComponent} from './compatibleDataProvidersTable.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: SearchCompatibleDataprovidersTableComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -2,7 +2,8 @@ import {Component, Input, ViewChild} from '@angular/core';
import {Location} from '@angular/common';
import { ActivatedRoute} from '@angular/router';
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
import {OpenaireProperties, ErrorCodes, SearchFields,SearchDataprovidersService, SearchUtilsClass, Filter, Value } from 'ng-openaire-library';
import {ErrorCodes, SearchFields,SearchDataprovidersService, SearchUtilsClass,
Filter, Value, EnvProperties } from 'ng-openaire-library';
@Component({
selector: 'search-content-providers-table',
@ -40,16 +41,21 @@ export class SearchCompatibleDataprovidersTableComponent {
public resourcesQuery = "&query=((oaftype exact datasource) not(datasourcecompatibilityid = UNKNOWN) not(datasourcecompatibilityid = notCompatible) not(datasourcetypeuiid = other))";*/
public disableForms: boolean = false;
properties:EnvProperties;
@ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
this.errorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.LOADING;
this.baseUrl = OpenaireProperties.getLinkToSearchCompatibleDataProvidersTable();
}
}
public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.baseUrl = data.envSpecific.searchLinkToEntityRegistriesDataProvidersTable;
});
this.searchPage.refineFields = this.refineFields;
this.sub = this.route.queryParams.subscribe(params => {
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
@ -77,11 +83,11 @@ export class SearchCompatibleDataprovidersTableComponent {
this.searchUtils.totalResults = 0;
let size: number = 0;
this.subResults = this._searchDataprovidersService.searchCompatibleDataprovidersTable().subscribe(
this.subResults = this._searchDataprovidersService.searchCompatibleDataprovidersTable(this.properties).subscribe(
data => {
size = data;
if(size > 0) {
this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders("", null, 1, size, []).subscribe(
this.subResults = this._searchDataprovidersService.searchCompatibleDataproviders("", null, 1, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Content Providers [total results:"+this.searchUtils.totalResults+"]");

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchEntityRegistriesComponent} from './entityRegistries.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchEntityRegistriesComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{SearchEntityRegistriesTableComponent} from './entityRegistriesTable.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: SearchEntityRegistriesTableComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -1,7 +1,8 @@
import {Component, Input, ViewChild} from '@angular/core';
import { ActivatedRoute} from '@angular/router';
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
import {OpenaireProperties, ErrorCodes, SearchFields,SearchDataprovidersService, SearchUtilsClass, Filter, Value } from 'ng-openaire-library';
import {ErrorCodes, SearchFields,SearchDataprovidersService,
SearchUtilsClass, Filter, Value,EnvProperties } from 'ng-openaire-library';
@Component({
@ -33,7 +34,7 @@ export class SearchEntityRegistriesTableComponent {
public searchFields:SearchFields = new SearchFields();
public refineFields: string[] = this.searchFields.ENTITY_REGISTRIES_FIELDS;
public disableForms: boolean = false;
properties:EnvProperties;
@ViewChild (SearchPageTableViewComponent) searchPage : SearchPageTableViewComponent ;
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
@ -42,6 +43,12 @@ export class SearchEntityRegistriesTableComponent {
}
public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.baseUrl = data.envSpecific.searchLinkToEntityRegistriesDataProviders;
});
this.searchPage.refineFields = this.refineFields;
this.sub = this.route.queryParams.subscribe(params => {
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
@ -68,11 +75,11 @@ export class SearchEntityRegistriesTableComponent {
this.searchUtils.totalResults = 0;
let size: number = 0;
this.subResults = this._searchDataprovidersService.searchEntityRegistriesTable().subscribe(
this.subResults = this._searchDataprovidersService.searchEntityRegistriesTable(this.properties).subscribe(
data => {
size = data;
if(size > 0) {
this.subResults = this._searchDataprovidersService.searchEntityRegistries("",null, page, size, []).subscribe(
this.subResults = this._searchDataprovidersService.searchEntityRegistries("",null, page, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Entity Registries [total results:"+this.searchUtils.totalResults+"]");

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchJournalsComponent} from './journals.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchJournalsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{SearchJournalsTableComponent} from './journalsTable.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: SearchJournalsTableComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
} , canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -1,7 +1,7 @@
import {Component, Input, ViewChild} from '@angular/core';
import { ActivatedRoute} from '@angular/router';
import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component';
import {OpenaireProperties, ErrorCodes, SearchFields,SearchDataprovidersService, SearchUtilsClass, Filter, Value } from 'ng-openaire-library';
import {ErrorCodes, SearchFields,SearchDataprovidersService,EnvProperties, SearchUtilsClass, Filter, Value } from 'ng-openaire-library';
@Component({
@ -31,7 +31,7 @@ export class SearchJournalsTableComponent {
public _location:Location;
public searchFields:SearchFields = new SearchFields();
public refineFields: string[] = this.searchFields.JOURNAL_FIELDS;
properties:EnvProperties;
/*public CSV: any = { "columnNames": [ "Title", "Type", "Coutries", "Compatibility" ],
"export":[]
};
@ -46,10 +46,15 @@ export class SearchJournalsTableComponent {
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchDataprovidersService ) {
this.errorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.LOADING;
this.baseUrl = OpenaireProperties.getLinkToSearchJournalsTable();
}
public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.baseUrl = data.envSpecific.searchLinkToJournalsTable;
});
this.searchPage.refineFields = this.refineFields;
this.sub = this.route.queryParams.subscribe(params => {
this.searchUtils.keyword = (params['keyword']?params['keyword']:'');
@ -66,7 +71,8 @@ export class SearchJournalsTableComponent {
}
if(this.subResults){
this.subResults.unsubscribe();
} }
}
}
private _getResults(){
//this.csvParams = this.resourcesQuery+"&type=datasources";
@ -77,11 +83,11 @@ export class SearchJournalsTableComponent {
this.searchUtils.totalResults = 0;
let size: number = 0;
this.subResults = this._searchDataprovidersService.searchJournalsTable().subscribe(
this.subResults = this._searchDataprovidersService.searchJournalsTable(this.properties).subscribe(
data => {
size = data;
if(size > 0) {
this.subResults = this._searchDataprovidersService.searchJournals("", null, 1, size, []).subscribe(
this.subResults = this._searchDataprovidersService.searchJournals("", null, 1, size, [],this.properties).subscribe(
data => {
this.searchUtils.totalResults = data[0];
console.info("search Journals [total results:"+this.searchUtils.totalResults+"]");

View File

@ -3,9 +3,10 @@ import {Observable} from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import {Location} from '@angular/common';
import { DataTableDirective } from 'angular-datatables';
import { ActivatedRoute} from '@angular/router';
import {SearchFields, DOI, StringUtils,ModalLoading,ErrorCodes,OpenaireProperties,PiwikService, SearchDataprovidersService} from 'ng-openaire-library';
import {Meta, SearchUtilsClass, Filter, Value, SearchFilterComponent, SearchFilterModalComponent } from 'ng-openaire-library';
import {SearchFields, DOI, StringUtils,ModalLoading,ErrorCodes, PiwikService, SearchDataprovidersService} from 'ng-openaire-library';
import {Meta, SearchUtilsClass, Filter, Value, SearchFilterComponent, SearchFilterModalComponent, EnvProperties} from 'ng-openaire-library';
@Component({
selector: 'search-page-table',
@ -53,9 +54,21 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
showTable = false; filteringAdded = false;
@ViewChild(DataTableDirective) datatableElement: DataTableDirective;
dtTrigger: Subject<any> = new Subject(); //necessary
constructor (private location: Location , private _meta: Meta, private _piwikService:PiwikService, private _searchDataprovidersService: SearchDataprovidersService ) { }
properties:EnvProperties;
constructor (private route: ActivatedRoute, private location: Location , private _meta: Meta, private _piwikService:PiwikService, private _searchDataprovidersService: SearchDataprovidersService ) { }
ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if(typeof window !== 'undefined') {
this.updateUrl(data.envSpecific.baseLink+location.pathname);
}
if(typeof document !== 'undefined' && data.envSpecific.enablePiwikTrack){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
}
});
this.dtOptions = {
"paging": true,
"searching": false,
@ -64,12 +77,8 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
};
this.updateTitle(this.pageTitle);
this.updateDescription("Openaire, search, repositories, open access, type, content provider, funder, project, " + this.type + "," +this.pageTitle);
if(typeof window !== 'undefined') {
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
}
if(OpenaireProperties.isPiwikTrackEnabled() && (typeof document !== 'undefined')){
this.piwiksub = this._piwikService.trackView(this.pageTitle).subscribe();
}
}
ngOnDestroy() {
if(this.piwiksub){

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchDataprovidersComponent} from './searchDataproviders.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchDataprovidersComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -2,14 +2,15 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import{OpenaireSearchDatasetsComponent} from './searchDatasets.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled, EnvironmentSpecificResolver} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchDatasetsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
}, canDeactivate: [PreviousRouteRecorder] }
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] , resolve: { envSpecific: EnvironmentSpecificResolver }},
])
]

View File

@ -5,7 +5,7 @@ import { FormsModule } from '@angular/forms';
import{ SearchDatasetsRoutingModule} from './searchDatasets-routing.module';
import{OpenaireSearchDatasetsComponent} from './searchDatasets.component';
import {SearchDatasetsModule, PreviousRouteRecorder, FreeGuard, IsRouteEnabled} from 'ng-openaire-library';
import {SearchDatasetsModule, PreviousRouteRecorder, FreeGuard, IsRouteEnabled, EnvironmentSpecificResolver, EnvironmentSpecificService} from 'ng-openaire-library';
@NgModule({
@ -17,7 +17,7 @@ import {SearchDatasetsModule, PreviousRouteRecorder, FreeGuard, IsRouteEnabled}
declarations: [
OpenaireSearchDatasetsComponent
],
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled],
providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled, EnvironmentSpecificResolver, EnvironmentSpecificService],
exports: [
OpenaireSearchDatasetsComponent
]

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchOrganizationsComponent} from './searchOrganizations.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchOrganizationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchProjectsComponent} from './searchProjects.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchProjectsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -3,12 +3,13 @@ import { RouterModule } from '@angular/router';
import{OpenaireSearchPublicationsComponent} from './searchPublications.component';
import {FreeGuard,PreviousRouteRecorder, IsRouteEnabled} from 'ng-openaire-library';
import {OpenaireProperties} from '../../utils/openaireProperties';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchPublicationsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: {
redirect: '/error'
redirect: '/error', api: OpenaireProperties.adminToolsAPIURL, community :OpenaireProperties.adminToolsCommunity
}, canDeactivate: [PreviousRouteRecorder] }
])

View File

@ -1,418 +1,21 @@
export class OpenaireProperties {
private static productionMode:boolean = false;
private static enablePiwikTrack:boolean = false;
private static enableHelper:boolean = false;
private static useCache:boolean = true;
//base url
private static baseLink = "https://demo.openaire.eu";
public static adminToolsAPIURL = "http://duffy.di.uoa.gr:8080/uoa-admin-tools";
public static adminToolsAPIURL_pm = "http://duffy.di.uoa.gr:8080/uoa-admin-tools";
public static adminToolsCommunity = "openaire";
//landing Pages
private static baseSearchLink="/";
private static searchLinkToPublication = "search/publication?articleId=";
private static searchLinkToProject = "search/project?projectId=";
private static searchLinkToDataProvider = "search/dataprovider?datasourceId=";
private static searchLinkToDataset = "search/dataset?datasetId=";
private static searchLinkToOrganization = "search/organization?organizationId=";
//Search pages
private static searchLinkToPublications = "search/find/publications";
private static searchLinkToDataProviders = "search/find/dataproviders";
private static searchLinkToProjects = "search/find/projects";
private static searchLinkToDatasets = "search/find/datasets";
private static searchLinkToSoftware = "search/find/software";
private static searchLinkToOrganizations = "search/find/organizations";
private static searchLinkToPeople = "search/find/people";
public static searchLinkToCompatibleDataProviders = "search/content-providers";
public static searchLinkToCompatibleDataProvidersTable = "search/content-providers-table";
public static searchLinkToEntityRegistriesDataProviders = "search/entity-registries";
public static searchLinkToEntityRegistriesDataProvidersTable = "search/entity-registries-table";
public static searchLinkToJournals = "search/journals";
public static searchLinkToJournalsTable = "search/journals-table";
//Advanced Search for pages
public static searchLinkToAdvancedPublications = "search/advanced/publications";
public static searchLinkToAdvancedProjects = "search/advanced/projects";
public static searchLinkToAdvancedDatasets = "search/advanced/datasets";
public static searchLinkToAdvancedSoftware = "search/advanced/software";
public static searchLinkToAdvancedDataProviders = "search/advanced/dataproviders";
public static searchLinkToAdvancedOrganizations = "search/advanced/organizations";
public static searchLinkToAdvancedPeople = "search/advanced/people";
private static metricsAPIURL = "https://beta.services.openaire.eu/usagestats/";
private static framesAPIURL = "https://beta.openaire.eu/stats3/";
private static loginAPIURL = "http://rudie.di.uoa.gr:8080/dnet%2Dopenaire%2Dusers%2D1.0.0%2DSNAPSHOT/api/users/authenticates"
//"http://scoobydoo.di.uoa.gr:8080/uoa-user-management-1.0.0-SNAPSHOT/api/users/authenticates";
private static loginAPIURL_pm = "https://beta.services.openaire.eu/uoa-user-management/api/users/authenticates";
private static claimsAPIURL = "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/";
private static claimsAPIURL_pm = "https://beta.services.openaire.eu/claims/rest/claimsService/";
private static searchAPIURLLAst_pm = "https://beta.services.openaire.eu/search/v2/api/";
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 searchResourcesAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/resources";
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 csvAPIURL_pm = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
// private static csvAPIURL = "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/api/";//publications?format=csv
private static csvAPIURL = "https://beta.services.openaire.eu/search/v2/api/";//publications?format=csv
private static searchCrossrefAPIURL = "https://api.crossref.org/works";
// private static searchDataciteAPIURL = "https://search.datacite.org/api";
private static searchDataciteAPIURL = "https://api.datacite.org/works";
private static searchOrcidURL = "https://pub.orcid.org/";
// Identifiers
private static pmidURL = "http://www.ncbi.nlm.nih.gov/pubmed/";
private static doiURL = "https://dx.doi.org/";
private static cordisURL = "http://cordis.europa.eu/projects/";
private static pmcURL = "http://europepmc.org/articles/";
private static handleURL = "http://hdl.handle.net/";
// Zenodo's url
private static zenodo = "https://zenodo.org/";
// Open access link
private static openAccess = "https://www.openaire.eu/support/faq#article-id-234";
// Open access repository link
private static openAccessRepo = "https://www.openaire.eu/support/faq#article-id-310";
// FP7 link
private static fp7Guidlines = "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme";
// H2020 link
private static h2020Guidlines = "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020";
// ERC Guidlines
private static ercGuidlines = "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf";
// helpdesk link
private static helpdesk = "https://www.openaire.eu/support/helpdesk";
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 piwikBaseUrl =" https://analytics.openaire.eu/piwik.php?idsite=6";
private static loginUrl ="http://rudie.di.uoa.gr:8080/dnet-openaire-users-2.0.0-SNAPSHOT/openid_connect_login";
//"http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login";
private static loginUrl_pm ="https://beta.services.openaire.eu/uoa-user-management/openid_connect_login";
private static logoutUrl ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=";
private static logoutUrl_pm ="https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=";
private static logoutOpenaireUrl ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout";
private static logoutOpenaireUrl_pm ="http://dl067.madgik.di.uoa.gr/idp/profile/Logout";
private static cookieDomain =".di.uoa.gr";
private static cookieDomain_pm =".openaire.eu";
private static feedbackmail ="openaire.test@gmail.com";
private static helperPageUrl ="http://scoobydoo.di.uoa.gr:16000/api/page/route";
private static cache ="http://scoobydoo.di.uoa.gr:3000/get?url=";
private static cache_pm ="https://demo.openaire.eu/cache/get?url=";
public static getBaseLink():string{
return this.baseLink;
}
//landing Pages' getters
public static getsearchLinkToPublication():string{
return this.baseSearchLink + this.searchLinkToPublication;
}
public static getsearchLinkToDataset():string{
return this.baseSearchLink + this.searchLinkToDataset;
}
public static getsearchLinkToProject():string{
return this.baseSearchLink + this.searchLinkToProject;
}
public static getsearchLinkToOrganization():string{
return this.searchLinkToOrganization;
}
public static getsearchLinkToDataProvider():string{
return this.searchLinkToDataProvider;
}
//searchPages
public static getLinkToSearchPublications():string{
return this.baseSearchLink + this.searchLinkToPublications;
}
public static getLinkToSearchProjects():string{
return this.baseSearchLink + this.searchLinkToProjects;
}
public static getLinkToSearchDataProviders():string{
return this.baseSearchLink + this.searchLinkToDataProviders;
}
public static getLinkToSearchCompatibleDataProviders():string{
return this.baseSearchLink + this.searchLinkToCompatibleDataProviders;
}
public static getLinkToSearchCompatibleDataProvidersTable():string{
return this.baseSearchLink + this.searchLinkToCompatibleDataProvidersTable;
}
public static getLinkToSearchEntityRegistries():string{
return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProviders;
}
public static getLinkToSearchEntityRegistriesTable():string{
return this.baseSearchLink + this.searchLinkToEntityRegistriesDataProvidersTable;
}
public static getLinkToSearchJournals():string{
return this.baseSearchLink + this.searchLinkToJournals;
}
public static getLinkToSearchJournalsTable():string{
return this.baseSearchLink + this.searchLinkToJournalsTable;
}
public static getLinkToSearchDatasets():string{
return this.baseSearchLink + this.searchLinkToDatasets;
}
public static getLinkToSearchSoftware():string{
return this.baseSearchLink + this.searchLinkToSoftware;
}
public static getLinkToSearchOrganizations():string{
return this.baseSearchLink + this.searchLinkToOrganizations;
}
public static getLinkToSearchPeople():string{
return this.baseSearchLink + this.searchLinkToPeople;
}
//Advanced searchPages
public static getLinkToAdvancedSearchPublications():string{
return this.baseSearchLink + this.searchLinkToAdvancedPublications;
}
public static getLinkToAdvancedSearchProjects():string{
return this.baseSearchLink + this.searchLinkToAdvancedProjects;
}
public static getLinkToAdvancedSearchDataProviders():string{
return this.baseSearchLink + this.searchLinkToAdvancedDataProviders;
}
public static getLinkToAdvancedSearchDatasets():string{
return this.baseSearchLink + this.searchLinkToAdvancedDatasets;
}
public static getLinkToAdvancedSearchSoftware():string{
return this.baseSearchLink + this.searchLinkToAdvancedSoftware;
}
public static getLinkToAdvancedSearchOrganizations():string{
return this.baseSearchLink + this.searchLinkToAdvancedOrganizations;
}
public static getLinkToAdvancedSearchPeople():string{
return this.baseSearchLink + this.searchLinkToAdvancedPeople;
}
// Services - APIs' getters
// public static getSearchAPIURL():string{
// return this.searchAPIURL;
// }
// 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 {
return this.framesAPIURL;
}
public static getMetricsAPIURL(): string {
return this.metricsAPIURL;
}
public static getLoginAPIURL(): string {
if(this.productionMode){
return this.loginAPIURL_pm;
}else{
return this.loginAPIURL;
}
// return this.loginAPIURL;
}
public static getSearchAPIURLLast():string{
if(this.productionMode){
return this.searchAPIURLLAst_pm;
}else{
return this.searchAPIURLLAst;
}
// return this.searchAPIURLLAst;
}
//query using full query:
//
public static getSearchResourcesAPIURL():string{
if(this.productionMode){
return this.searchResourcesAPIURL_pm;
}else{
return this.searchResourcesAPIURL;
}
// return this.searchResourcesAPIURL;
}
public static getSearchAPIURLForEntity(entityType:string):string{
var suffix = "";
if(entityType == "project"){
suffix="projects/";
}else if(entityType == "publication"){
suffix="publications/";
}else if(entityType == "dataset"){
suffix="datasets/";
} else if(entityType == "software"){
suffix="software/";
}else if(entityType == "organization"){
suffix="organizations/";
}else if(entityType == "dataprovider"){
suffix="datasources/";
}else if(entityType == "person"){
suffix="people/";
}
return (this.productionMode?this.searchAPIURLLAst_pm:this.searchAPIURLLAst) + suffix;
}
public static getClaimsAPIURL():string{
if(this.productionMode){
return this.claimsAPIURL_pm;
}else{
return this.claimsAPIURL;
}
}
public static getSearchCrossrefAPIURL():string{
return this.searchCrossrefAPIURL;
}
public static getSearchDataciteAPIURL():string{
return this.searchDataciteAPIURL;
}
public static getSearchOrcidURL():string{
return this.searchOrcidURL;
}
// Identifiers' getters
public static getPmidURL():string{
return this.pmidURL;
}
public static getDoiURL():string{
return this.doiURL;
}
public static getCordisURL():string{
return this.cordisURL;
}
public static getPmcURL():string{
return this.pmcURL;
}
public static getHandleURL():string{
return this.handleURL;
}
// Zenodo's getter
public static getZenodoURL():string{
return this.zenodo;
}
// Open access getter
public static getOpenAccess():string{
return this.openAccess;
}
// Open access repository getter
public static getOpenAccessRepo():string{
return this.openAccessRepo;
}
// FP7 link getter
public static getFP7Guidlines():string{
return this.fp7Guidlines;
}
// H2020 link getter
public static getH2020Guidlines():string{
return this.h2020Guidlines;
}
// ERC Guidlines getter
public static getERCGuidlines():string{
return this.ercGuidlines;
}
// helpdesk link getter
public static getHelpdesk():string{
return this.helpdesk;
}
//upload service for bulk claim - upload csv file
public static getUploadServiceUrl():string{
if(this.productionMode){
return this.uploadService_pm;
}else{
return this.uploadService;
}
}
//vocabularies API
public static getVocabulariesAPI():string{
return this.vocabulariesAPI;
}
public static getPiwikBaseURL():string{
return this.piwikBaseUrl;
}
public static isPiwikTrackEnabled():boolean{
return this.enablePiwikTrack;
}
public static getLoginURL():string{
if(this.productionMode){
return this.loginUrl_pm;
}else{
return this.loginUrl;
}
}
public static getLogoutURL():string{
if(this.productionMode){
return this.logoutUrl_pm;
}else{
return this.logoutUrl;
}
}
public static getLogoutOpenaireURL():string{
if(this.productionMode){
return this.logoutOpenaireUrl_pm;
}else{
return this.logoutOpenaireUrl;
}
}
public static getCookieDomain():string{
if(this.productionMode){
return this.cookieDomain_pm;
}else{
return this.cookieDomain;
}
}
public static getFeedbackMail():string{
return this.feedbackmail;
}
public static getHelperPageUrl():string{
return this.helperPageUrl;
}
public static isHelperEnabled():boolean{
return this.enableHelper;
}
public static getCacheUrl():string{
public static getAdminToolsAPIURL():string{
if(this.productionMode){
return this.cache_pm;
return this.adminToolsAPIURL_pm;
}else{
return this.cache;
return this.adminToolsAPIURL;
}
}
public static isCacheEnabled():boolean{
return this.useCache;
public static getAdminToolsCommunity():string{
return this.adminToolsCommunity;
}
}
export class ErrorCodes {
public LOADING = 0;
public DONE = 1;
public NONE = 2;
public ERROR = 3;
public NOT_AVAILABLE = 4;
public OUT_OF_BOUND = 5;
public NOT_FOUND = 6;
}

View File

@ -0,0 +1,93 @@
{
"enablePiwikTrack" : false,
"enableHelper" : false,
"useCache" : true,
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
"claimsAPIURL" : "http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
"searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
"searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",
"csvAPIURL" : "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/reports",
"searchCrossrefAPIURL" : "https://api.crossref.org/works",
"searchDataciteAPIURL" : "https://api.datacite.org/works",
"searchOrcidURL" : "https://pub.orcid.org/",
"pmidURL" : "http://www.ncbi.nlm.nih.gov/pubmed/",
"doiURL" : "https://dx.doi.org/",
"cordisURL" : "http://cordis.europa.eu/projects/",
"pmcURL" : "http://europepmc.org/articles/",
"handleURL" : "http://hdl.handle.net/",
"zenodo" : "https://zenodo.org/",
"openAccess" : "https://www.openaire.eu/support/faq#article-id-234",
"openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310",
"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",
"helpdesk" : "https://www.openaire.eu/support/helpdesk",
"uploadService" : "http://scoobydoo.di.uoa.gr:8000/upload",
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
"piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite:6",
"loginUrl" :"http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
"logoutUrl" :"https://aai.openminted.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo:",
"logoutOpenaireUrl" :"http://dl067.madgik.di.uoa.gr/idp/profile/Logout",
"cookieDomain" :".di.uoa.gr",
"feedbackmail" :"openaire.test@gmail.com",
"helperPageUrl" :"http://scoobydoo.di.uoa.gr:16000/api/page/route",
"cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
"adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools",
"adminToolsCommunity" :"openaire",
"csvLimit": 2000,
"pagingLimit": 20,
"resultsPerPage": 10,
"baseLink" : "https://demo.openaire.eu",
"searchLinkToPublication" : "/search/publication?articleId:",
"searchLinkToProject" : "/search/project?projectId:",
"searchLinkToDataProvider" : "/search/dataprovider?datasourceId:",
"searchLinkToDataset" : "/search/dataset?datasetId:",
"searchLinkToOrganization" : "/search/organization?organizationId:",
"searchLinkToPublications" : "/search/find/publications",
"searchLinkToDataProviders" : "/search/find/dataproviders",
"searchLinkToProjects" : "/search/find/projects",
"searchLinkToDatasets" : "/search/find/datasets",
"searchLinkToSoftware" : "/search/find/software",
"searchLinkToOrganizations" : "/search/find/organizations",
"searchLinkToCompatibleDataProviders" : "/search/content-providers",
"searchLinkToCompatibleDataProvidersTable" : "/search/content-providers-table",
"searchLinkToEntityRegistriesDataProviders" : "/search/entity-registries",
"searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table",
"searchLinkToJournals" : "/search/journals",
"searchLinkToJournalsTable" : "/search/journals-table",
"searchLinkToAdvancedPublications" : "/search/advanced/publications",
"searchLinkToAdvancedProjects" : "/search/advanced/projects",
"searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
"searchLinkToAdvancedSoftware" : "/search/advanced/software",
"searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
"searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
"searchLinkToAdvancedPeople" : "/search/advanced/people"
}