[Monitor_dashboard | Trunk]: Add search and langind pages to monitor dashboard
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59062 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
204cb9a597
commit
cffb3c87ae
|
@ -23,6 +23,7 @@
|
|||
"styles": [
|
||||
"src/styles.css",
|
||||
"src/material.scss",
|
||||
"src/assets/search.scss",
|
||||
"node_modules/datatables.net-dt/css/jquery.dataTables.css"
|
||||
],
|
||||
"scripts": [
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
[class.sidebar_mini]="!open && hasMiniMenu && hasSidebar" [class.stakeholderPage]="isFrontPage">
|
||||
<div *ngIf="hasHeader" id="header_main" [class.light_header]="isFrontPage" [class.header_full]="!hasSidebar">
|
||||
<img
|
||||
*ngIf="(!open || !hasSidebar) && (properties.environment === 'beta' || properties.environment === 'development')"
|
||||
*ngIf="((!open && !hasMiniMenu) || !hasSidebar) && (properties.environment === 'beta' || properties.environment === 'development')"
|
||||
class="badge"
|
||||
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||
[alt]="properties.environment">
|
||||
|
@ -46,7 +46,7 @@
|
|||
<dashboard-sidebar *ngIf="stakeholder && isFrontPage" [items]="sideBarItems"
|
||||
[activeItem]="activeTopic?activeTopic.alias:null" [showHeader]=true
|
||||
headerName="Monitor"
|
||||
[searchLink]="(properties.showContent)?properties.baseLink+'/search/'+stakeholder.alias+'/find/research-outcomes':null"
|
||||
[searchLink]="(properties.showContent)?stakeholder.alias+'/search/':null"
|
||||
[headerUrl]="properties.baseLink"
|
||||
></dashboard-sidebar>
|
||||
<dashboard-sidebar *ngIf="hasAdminMenu" [items]="adminMenuItems" headerName="Monitor"
|
||||
|
|
|
@ -9,7 +9,7 @@ import {BehaviorSubject, Subscriber} from "rxjs";
|
|||
import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||
import {MenuItem} from "./openaireLibrary/sharedComponents/menu";
|
||||
import {Stakeholder, Topic} from "./openaireLibrary/monitor/entities/stakeholder";
|
||||
import {properties} from "../environments/environment";
|
||||
import {LinksResolver} from "./search/links-resolver";
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -84,6 +84,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
.then(properties => {
|
||||
this.properties = properties;
|
||||
this.subscriptions.push(this.params.subscribe(params => {
|
||||
let isSearch = this.router.url.includes('search');
|
||||
if (params && params['stakeholder']) {
|
||||
if (!this.stakeholderService.stakeholder ||
|
||||
this.stakeholderService.stakeholder.alias !== params['stakeholder']) {
|
||||
|
@ -91,7 +92,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.stakeholderService.setStakeholder(stakeholder);
|
||||
this.layoutService.setOpen(true);
|
||||
this.stakeholder = stakeholder;
|
||||
if (params && params['topic'] && !this.activeTopic) {
|
||||
LinksResolver.setProperties(this.stakeholder.alias);
|
||||
if(isSearch) {
|
||||
this.activeTopic = null;
|
||||
} else if (params && params['topic'] && !this.activeTopic) {
|
||||
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.isPublic) && topic.isActive);
|
||||
} else {
|
||||
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.isPublic) && topic.isActive);
|
||||
|
@ -99,16 +103,20 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.setSideBar();
|
||||
}, error => {
|
||||
this.stakeholderService.setStakeholder(null);
|
||||
LinksResolver.resetProperties();
|
||||
this.navigateToError();
|
||||
});
|
||||
} else {
|
||||
if (params && params['topic']) {
|
||||
if(isSearch) {
|
||||
this.activeTopic = null;
|
||||
} else if (params && params['topic']) {
|
||||
this.activeTopic = this.stakeholder.topics.find(topic => topic.alias === decodeURIComponent(params['topic']) && this.isPublicOrIsMember(topic.isPublic) && topic.isActive);
|
||||
} else {
|
||||
this.activeTopic = this.stakeholder.topics.find(topic => this.isPublicOrIsMember(topic.isPublic) && topic.isActive);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LinksResolver.resetProperties();
|
||||
this.stakeholderService.setStakeholder(null);
|
||||
this.layoutService.setOpen(true);
|
||||
this.stakeholder = null;
|
||||
|
|
|
@ -5,7 +5,7 @@ import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRout
|
|||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {InputModule} from "../openaireLibrary/dashboard/sharedComponents/input/input.module";
|
||||
import {LoadingModule} from "../openaireLibrary/dashboard/sharedComponents/loading/loading.module";
|
||||
import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";
|
||||
import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module";
|
||||
import {ReactiveFormsModule} from "@angular/forms";
|
||||
import {AdminDashboardGuard} from "../utils/adminDashboard.guard";
|
||||
|
|
|
@ -3,17 +3,24 @@ import {RouterModule} from '@angular/router';
|
|||
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {MonitorComponent} from "./monitor.component";
|
||||
import {EnvironmentSpecificResolver} from "../openaireLibrary/utils/properties/environmentSpecificResolver";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', redirectTo: '/admin', pathMatch: 'full'},
|
||||
{path: '', redirectTo: '/admin', pathMatch: 'full'},
|
||||
{
|
||||
path: ':stakeholder',
|
||||
component: MonitorComponent,
|
||||
canActivate: [FreeGuard],
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
},
|
||||
{
|
||||
path: ':stakeholder/search',
|
||||
loadChildren: '../search/search.module#SearchModule',
|
||||
resolve: {envSpecific: EnvironmentSpecificResolver}
|
||||
},
|
||||
{ path: ':stakeholder/project-report', loadChildren: '../search/landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{
|
||||
path: ':stakeholder/:topic',
|
||||
component: MonitorComponent,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorDataProviderComponent} from './dataProvider.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{path: '', component: MonitorDataProviderComponent, canDeactivate: [PreviousRouteRecorder]}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DataProviderRoutingModule {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-dataprovider',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<dataprovider></dataprovider>
|
||||
</div>`,
|
||||
})
|
||||
export class MonitorDataProviderComponent {
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import { NgModule} from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { DataProviderModule } from '../../../openaireLibrary/landingPages/dataProvider/dataProvider.module';
|
||||
import { MonitorDataProviderComponent } from './dataProvider.component';
|
||||
import {DataProviderRoutingModule} from './dataProvider-routing.module';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
||||
@NgModule({
|
||||
imports: [DataProviderModule, DataProviderRoutingModule],
|
||||
declarations:[MonitorDataProviderComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorDataProviderComponent]
|
||||
})
|
||||
export class LibDataProviderModule { }
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorDatasetComponent} from './dataset.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{path: '', component: MonitorDatasetComponent, canDeactivate: [PreviousRouteRecorder]}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class DatasetRoutingModule {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-dataset',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<result-landing type="dataset"></result-landing>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
export class MonitorDatasetComponent {
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import { MonitorDatasetComponent } from './dataset.component';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {DatasetRoutingModule} from './dataset-routing.module';
|
||||
import {ResultLandingModule} from "../../../openaireLibrary/landingPages/result/resultLanding.module";
|
||||
@NgModule({
|
||||
imports: [DatasetRoutingModule, ResultLandingModule],
|
||||
declarations:[MonitorDatasetComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorDatasetComponent]
|
||||
})
|
||||
export class LibDatasetModule { }
|
|
@ -0,0 +1,16 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorHtmlProjectReportComponent} from './htmlProjectReport.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{path: '', component: MonitorHtmlProjectReportComponent, canDeactivate: [PreviousRouteRecorder]}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class HtmlProjectReportRoutingModule {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-htmlProjectReport',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<htmlProjectReport></htmlProjectReport>
|
||||
</div>`,
|
||||
})
|
||||
export class MonitorHtmlProjectReportComponent {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {HtmlProjectReportModule} from '../../../openaireLibrary/landingPages/htmlProjectReport/htmlProjectReport.module';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {MonitorHtmlProjectReportComponent} from './htmlProjectReport.component';
|
||||
import {HtmlProjectReportRoutingModule} from './htmlProjectReport-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [HtmlProjectReportModule, HtmlProjectReportRoutingModule],
|
||||
declarations:[MonitorHtmlProjectReportComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorHtmlProjectReportComponent]
|
||||
})
|
||||
export class LibHtmlProjectReportModule { }
|
|
@ -0,0 +1,16 @@
|
|||
//import {MaterialModule} from '@angular/material';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {OrganizationModule} from '../../../openaireLibrary/landingPages/organization/organization.module';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {MonitorOrganizationComponent} from './organization.component';
|
||||
import {OrganizationRoutingModule} from './organization-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [OrganizationModule, OrganizationRoutingModule],
|
||||
declarations:[MonitorOrganizationComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorOrganizationComponent]
|
||||
})
|
||||
export class LibOrganizationModule { }
|
|
@ -0,0 +1,16 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorOrganizationComponent} from './organization.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{path: '', component: MonitorOrganizationComponent, canDeactivate: [PreviousRouteRecorder]}
|
||||
])
|
||||
]
|
||||
})
|
||||
export class OrganizationRoutingModule {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-organization',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<organization></organization>
|
||||
</div>`,
|
||||
})
|
||||
export class MonitorOrganizationComponent {
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {MonitorOrpComponent} from './orp.component';
|
||||
import {OrpRoutingModule} from './orp-routing.module';
|
||||
import {ResultLandingModule} from "../../../openaireLibrary/landingPages/result/resultLanding.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
OrpRoutingModule, ResultLandingModule
|
||||
],
|
||||
declarations: [
|
||||
MonitorOrpComponent
|
||||
],
|
||||
providers: [
|
||||
FreeGuard, PreviousRouteRecorder, IsRouteEnabled
|
||||
],
|
||||
exports: [
|
||||
MonitorOrpComponent
|
||||
]
|
||||
})
|
||||
export class LibOrpModule { }
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorOrpComponent} from './orp.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([{
|
||||
path: '', component: MonitorOrpComponent, canDeactivate: [PreviousRouteRecorder]
|
||||
}])
|
||||
]
|
||||
})
|
||||
|
||||
export class OrpRoutingModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-orp',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<result-landing type="orp"></result-landing>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
|
||||
export class MonitorOrpComponent {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {ProjectModule} from '../../../openaireLibrary/landingPages/project/project.module';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import {MonitorProjectComponent} from './project.component';
|
||||
import {ProjectRoutingModule} from './project-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [ProjectModule, ProjectRoutingModule],
|
||||
declarations:[MonitorProjectComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorProjectComponent]
|
||||
})
|
||||
export class LibProjectModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorProjectComponent} from './project.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorProjectComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class ProjectRoutingModule { }
|
|
@ -0,0 +1,11 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-project',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<project></project>
|
||||
</div>`,
|
||||
})
|
||||
export class MonitorProjectComponent {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import { MonitorPublicationComponent } from './publication.component';
|
||||
import {PublicationRoutingModule} from './publication-routing.module';
|
||||
import {ResultLandingModule} from "../../../openaireLibrary/landingPages/result/resultLanding.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [PublicationRoutingModule, ResultLandingModule],
|
||||
declarations:[MonitorPublicationComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorPublicationComponent]
|
||||
})
|
||||
export class LibPublicationModule { }
|
|
@ -0,0 +1,14 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorPublicationComponent} from './publication.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorPublicationComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class PublicationRoutingModule { }
|
|
@ -0,0 +1,12 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-publication',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<result-landing type="publication"></result-landing>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
export class MonitorPublicationComponent {
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {MonitorResultComponent} from './result.component';
|
||||
import {ResultRoutingModule} from './result-routing.module';
|
||||
import {ResultLandingModule} from "../../../openaireLibrary/landingPages/result/resultLanding.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [ResultRoutingModule, ResultLandingModule],
|
||||
declarations:[MonitorResultComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder],
|
||||
exports:[MonitorResultComponent]
|
||||
})
|
||||
export class LibResultModule { }
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorResultComponent} from './result.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorResultComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class ResultRoutingModule { }
|
|
@ -0,0 +1,11 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-result',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<result-landing type="result"></result-landing>
|
||||
</div>`,
|
||||
})
|
||||
export class MonitorResultComponent {
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
import { NgModule} from '@angular/core';
|
||||
import {FreeGuard} from '../../../openaireLibrary/login/freeGuard.guard';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../../../openaireLibrary/error/isRouteEnabled.guard';
|
||||
import { MonitorSoftwareComponent } from './software.component';
|
||||
import {SoftwareRoutingModule} from './software-routing.module';
|
||||
import {ResultLandingModule} from "../../../openaireLibrary/landingPages/result/resultLanding.module";
|
||||
@NgModule({
|
||||
imports: [SoftwareRoutingModule, ResultLandingModule],
|
||||
declarations:[MonitorSoftwareComponent],
|
||||
providers:[FreeGuard, PreviousRouteRecorder, IsRouteEnabled],
|
||||
exports:[MonitorSoftwareComponent]
|
||||
})
|
||||
export class LibSoftwareModule { }
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorSoftwareComponent} from './software.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorSoftwareComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SoftwareRoutingModule { }
|
|
@ -0,0 +1,12 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-software',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<result-landing type="software"></result-landing>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
export class MonitorSoftwareComponent {
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import {properties} from "../../environments/environment";
|
||||
|
||||
interface Links {
|
||||
searchLinkToResult;
|
||||
searchLinkToPublication;
|
||||
searchLinkToProject;
|
||||
searchLinkToDataProvider;
|
||||
searchLinkToDataset;
|
||||
searchLinkToSoftwareLanding;
|
||||
searchLinkToOrp;
|
||||
searchLinkToOrganization;
|
||||
searchLinkToResults,
|
||||
searchLinkToProjects,
|
||||
searchLinkToDataProviders,
|
||||
searchLinkToAdvancedResults,
|
||||
searchLinkToAdvancedProjects,
|
||||
searchLinkToAdvancedDataProviders,
|
||||
searchLinkToAdvancedOrganizations,
|
||||
}
|
||||
|
||||
export class LinksResolver {
|
||||
|
||||
private static default: Links = {
|
||||
searchLinkToResult: properties.searchLinkToResult,
|
||||
searchLinkToPublication: properties.searchLinkToPublication,
|
||||
searchLinkToProject: properties.searchLinkToProject,
|
||||
searchLinkToDataProvider: properties.searchLinkToDataProvider,
|
||||
searchLinkToDataset: properties.searchLinkToDataset,
|
||||
searchLinkToSoftwareLanding: properties.searchLinkToSoftwareLanding,
|
||||
searchLinkToOrp: properties.searchLinkToOrp,
|
||||
searchLinkToOrganization: properties.searchLinkToOrganization,
|
||||
searchLinkToResults: properties.searchLinkToResults,
|
||||
searchLinkToDataProviders: properties.searchLinkToDataProviders,
|
||||
searchLinkToProjects: properties.searchLinkToProjects,
|
||||
searchLinkToAdvancedResults: properties.searchLinkToAdvancedResults,
|
||||
searchLinkToAdvancedProjects: properties.searchLinkToAdvancedProjects,
|
||||
searchLinkToAdvancedDataProviders: properties.searchLinkToAdvancedDataProviders,
|
||||
searchLinkToAdvancedOrganizations: properties.searchLinkToAdvancedOrganizations,
|
||||
};
|
||||
|
||||
public static setProperties( alias: string) {
|
||||
Object.keys(this.default).forEach(field => {
|
||||
properties[field] = "/" + alias + (<string>this.default[field]);
|
||||
});
|
||||
}
|
||||
|
||||
public static resetProperties() {
|
||||
Object.keys(this.default).forEach(field => {
|
||||
properties[field] = this.default[field];
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {EnvironmentSpecificResolver} from "../openaireLibrary/utils/properties/environmentSpecificResolver";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule.forChild([
|
||||
// Search Pages
|
||||
{ path: '', redirectTo: 'find/research-outcomes'},
|
||||
{ path: 'find/research-outcomes', loadChildren: './searchPages/simple/searchResearchResults.module#MonitorSearchResearchResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'find/projects', loadChildren: './searchPages/simple/searchProjects.module#MonitorSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#MonitorSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#MonitorSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
// Advanced Search Pages
|
||||
{ path: 'advanced/research-outcomes', loadChildren: './searchPages/advanced/searchResearchResults.module#MonitorAdvancedSearchResearchResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'advanced/projects', loadChildren: './searchPages/advanced/searchProjects.module#MonitorAdvancedSearchProjectsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'advanced/dataproviders', loadChildren: './searchPages/advanced/searchDataProviders.module#MonitorAdvancedSearchDataProvidersModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'advanced/organizations', loadChildren: './searchPages/advanced/searchOrganizations.module#MonitorAdvancedSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
|
||||
// Landing Pages
|
||||
{ path: 'result', loadChildren: './landingPages/result/libResult.module#LibResultModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'project', loadChildren: './landingPages/project/libProject.module#LibProjectModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'dataprovider', loadChildren: './landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
{ path: 'organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
||||
])],
|
||||
providers:[EnvironmentSpecificResolver]
|
||||
})
|
||||
export class SearchModule {}
|
|
@ -0,0 +1,16 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{MonitorAdvancedSearchDataprovidersComponent} from './searchDataproviders.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorAdvancedSearchDataprovidersComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchDataProvidersRoutingModule { }
|
|
@ -0,0 +1,24 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MonitorAdvancedSearchDataprovidersComponent} from './searchDataproviders.component';
|
||||
import {SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchDataProvidersModule} from '../../../openaireLibrary/searchPages/searchDataProviders.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchDataProvidersModule, SearchDataProvidersRoutingModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorAdvancedSearchDataprovidersComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorAdvancedSearchDataprovidersComponent
|
||||
]
|
||||
})
|
||||
export class MonitorAdvancedSearchDataProvidersModule {
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-advanced-search-dataproviders',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-dataproviders *ngIf="initialized" [simpleView]="false"
|
||||
openaireLink="https://beta.explore.openaire.eu/search/find/dataproviders"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false">
|
||||
</search-dataproviders>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class MonitorAdvancedSearchDataprovidersComponent {
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "funder") {
|
||||
this.navigateToError();
|
||||
} else if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
} else if (stakeholder.type === "ri") {
|
||||
this.navigateToError();
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
navigateToError() {
|
||||
this.router.navigate(['/error'], {queryParams: {'page': this.router.url}});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{MonitorAdvancedSearchOrganizationsComponent} from './searchOrganizations.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorAdvancedSearchOrganizationsComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchOrganizationsRoutingModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-advanced-search-organizations',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-organizations [simpleView]="false">
|
||||
</search-organizations>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class MonitorAdvancedSearchOrganizationsComponent {
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {SearchOrganizationsRoutingModule} from './searchOrganizations-routing.module';
|
||||
import {MonitorAdvancedSearchOrganizationsComponent} from './searchOrganizations.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchOrganizationsModule} from "../../../openaireLibrary/searchPages/searchOrganizations.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchOrganizationsRoutingModule, SearchOrganizationsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorAdvancedSearchOrganizationsComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorAdvancedSearchOrganizationsComponent
|
||||
]
|
||||
})
|
||||
export class MonitorAdvancedSearchOrganizationsModule {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorAdvancedSearchProjectsComponent} from './searchProjects.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorAdvancedSearchProjectsComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchProjectsRoutingModule { }
|
|
@ -0,0 +1,54 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-advanced-search-projects',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-projects *ngIf="initialized" [simpleView]="false"
|
||||
openaireLink="https://beta.explore.openaire.eu/search/find/projects"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false">
|
||||
</search-projects>
|
||||
</div>
|
||||
`
|
||||
|
||||
})
|
||||
export class MonitorAdvancedSearchProjectsComponent {
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "funder") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Funder", "funderid", value, "");
|
||||
} else if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
} else if (stakeholder.type === "ri") {
|
||||
this.navigateToError();
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
navigateToError() {
|
||||
this.router.navigate(['/error'], {queryParams: {'page': this.router.url}});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {SearchProjectsRoutingModule} from './searchProjects-routing.module';
|
||||
import {MonitorAdvancedSearchProjectsComponent} from './searchProjects.component';
|
||||
import {SearchProjectsModule} from "../../../openaireLibrary/searchPages/searchProjects.module";
|
||||
import {PreviousRouteRecorder} from "../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, SearchProjectsRoutingModule, SearchProjectsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorAdvancedSearchProjectsComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorAdvancedSearchProjectsComponent
|
||||
]
|
||||
})
|
||||
export class MonitorAdvancedSearchProjectsModule {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorAdvancedSearchResearchResultsComponent,} from './searchResearchResults.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorAdvancedSearchResearchResultsComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchResearchResultsRoutingModule { }
|
|
@ -0,0 +1,49 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-advanced-search-results',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-research-results *ngIf="initialized" resultType="result" [simpleView]="false"
|
||||
openaireLink="https://beta.explore.openaire.eu/search/find/publications"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false"
|
||||
[showAdvancedSearchLink]="true"></search-research-results>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class MonitorAdvancedSearchResearchResultsComponent {
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "funder") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Funder", "relfunderid", value, "");
|
||||
} else if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
} else if (stakeholder.type === "ri") {
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", stakeholder.index_id, "");
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {SearchResearchResultsRoutingModule} from './searchResearchResults-routing.module';
|
||||
import {MonitorAdvancedSearchResearchResultsComponent} from './searchResearchResults.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchResearchResultsModule} from "../../../openaireLibrary/searchPages/searchResearchResults.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchResearchResultsRoutingModule, SearchResearchResultsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorAdvancedSearchResearchResultsComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorAdvancedSearchResearchResultsComponent
|
||||
]
|
||||
})
|
||||
export class MonitorAdvancedSearchResearchResultsModule {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{MonitorSearchDataprovidersComponent} from './searchDataproviders.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorSearchDataprovidersComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchDataProvidersRoutingModule { }
|
|
@ -0,0 +1,24 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MonitorSearchDataprovidersComponent} from './searchDataproviders.component';
|
||||
import {SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchDataProvidersModule} from '../../../openaireLibrary/searchPages/searchDataProviders.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchDataProvidersModule, SearchDataProvidersRoutingModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorSearchDataprovidersComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorSearchDataprovidersComponent
|
||||
]
|
||||
})
|
||||
export class MonitorSearchDataProvidersModule {
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-search-dataproviders',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-dataproviders *ngIf="initialized"
|
||||
openaireLink="https://beta.explore.openaire.eu/search/find/dataproviders"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false">
|
||||
</search-dataproviders>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class MonitorSearchDataprovidersComponent {
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "funder") {
|
||||
this.navigateToError();
|
||||
} else if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
} else if (stakeholder.type === "ri") {
|
||||
this.navigateToError();
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
navigateToError() {
|
||||
this.router.navigate(['/error'], {queryParams: {'page': this.router.url}});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import{MonitorSearchOrganizationsComponent} from './searchOrganizations.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorSearchOrganizationsComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchOrganizationsRoutingModule { }
|
|
@ -0,0 +1,13 @@
|
|||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-search-organizations',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-organizations>
|
||||
</search-organizations>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class MonitorSearchOrganizationsComponent {
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {SearchOrganizationsRoutingModule} from './searchOrganizations-routing.module';
|
||||
import {MonitorSearchOrganizationsComponent} from './searchOrganizations.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchOrganizationsModule} from "../../../openaireLibrary/searchPages/searchOrganizations.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchOrganizationsRoutingModule, SearchOrganizationsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorSearchOrganizationsComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorSearchOrganizationsComponent
|
||||
]
|
||||
})
|
||||
export class MonitorSearchOrganizationsModule {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorSearchProjectsComponent} from './searchProjects.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorSearchProjectsComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchProjectsRoutingModule { }
|
|
@ -0,0 +1,54 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-search-projects',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-projects *ngIf="initialized"
|
||||
openaireLink="https://beta.explore.openaire.eu/search/find/projects"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false">
|
||||
</search-projects>
|
||||
</div>
|
||||
`
|
||||
|
||||
})
|
||||
export class MonitorSearchProjectsComponent {
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "funder") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Funder", "funderid", value, "");
|
||||
} else if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
} else if (stakeholder.type === "ri") {
|
||||
this.navigateToError();
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
navigateToError() {
|
||||
this.router.navigate(['/error'], {queryParams: {'page': this.router.url}});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {SearchProjectsRoutingModule} from './searchProjects-routing.module';
|
||||
import {MonitorSearchProjectsComponent} from './searchProjects.component';
|
||||
import {SearchProjectsModule} from "../../../openaireLibrary/searchPages/searchProjects.module";
|
||||
import {PreviousRouteRecorder} from "../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, SearchProjectsRoutingModule, SearchProjectsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorSearchProjectsComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorSearchProjectsComponent
|
||||
]
|
||||
})
|
||||
export class MonitorSearchProjectsModule {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {MonitorSearchResearchResultsComponent} from './searchResearchResults.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: MonitorSearchResearchResultsComponent, canDeactivate: [PreviousRouteRecorder] }
|
||||
])
|
||||
]
|
||||
})
|
||||
export class SearchResearchResultsRoutingModule { }
|
|
@ -0,0 +1,49 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {StakeholderService} from "../../../openaireLibrary/monitor/services/stakeholder.service";
|
||||
|
||||
@Component({
|
||||
selector: 'monitor-search-results',
|
||||
template: `
|
||||
<div id="page_content">
|
||||
<search-research-results *ngIf="initialized" resultType="result"
|
||||
openaireLink="https://beta.explore.openaire.eu/search/find/publications"
|
||||
[customFilter]=customFilter [hasPrefix]="false"
|
||||
[includeOnlyResultsAndFilter]="false"
|
||||
[showAdvancedSearchLink]="true"></search-research-results>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
export class MonitorSearchResearchResultsComponent {
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialized: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private stakeholderService: StakeholderService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params['stakeholder']) {
|
||||
this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
|
||||
if (stakeholder) {
|
||||
if (stakeholder.type === "funder") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Funder", "relfunderid", value, "");
|
||||
} else if (stakeholder.type === "organization") {
|
||||
let value = stakeholder.index_id;
|
||||
this.customFilter = new SearchCustomFilter("Organization", "relorganizationid", value, "");
|
||||
} else if (stakeholder.type === "ri") {
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", stakeholder.index_id, "");
|
||||
}
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.initialized = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {SearchResearchResultsRoutingModule} from './searchResearchResults-routing.module';
|
||||
import {MonitorSearchResearchResultsComponent} from './searchResearchResults.component';
|
||||
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {SearchResearchResultsModule} from "../../../openaireLibrary/searchPages/searchResearchResults.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
SearchResearchResultsRoutingModule, SearchResearchResultsModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
MonitorSearchResearchResultsComponent
|
||||
],
|
||||
providers: [PreviousRouteRecorder],
|
||||
exports: [
|
||||
MonitorSearchResearchResultsComponent
|
||||
]
|
||||
})
|
||||
export class MonitorSearchResearchResultsModule {
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/* Search */
|
||||
.dashboard {
|
||||
@import "common-assets/library-css/library";
|
||||
|
||||
.uk-link {
|
||||
color: #2d72d6;
|
||||
}
|
||||
|
||||
.uk-link:hover {
|
||||
color: var(--portal-main-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Paging */
|
||||
.uk-pagination>*>* {
|
||||
display: block;
|
||||
color: #666;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
background: 0 0;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
transition: .1s ease-in-out;
|
||||
transition-property: color, background-color, border-color, box-shadow;
|
||||
font-size: 16px;
|
||||
letter-spacing: 0;
|
||||
border: 8px solid transparent;
|
||||
border-radius: 5px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.uk-pagination>*>:focus, .uk-pagination>*>:hover {
|
||||
color: #4687e6;
|
||||
text-decoration: none;
|
||||
background-color: transparent !important;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
|
@ -502,8 +502,8 @@ body.dashboard {
|
|||
opacity: 1;
|
||||
transform: none;
|
||||
-webkit-transform: none;
|
||||
padding: 5px 0;
|
||||
min-width: 160px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.dashboard .uk-dropdown .uk-nav.uk-dropdown-nav > li > a {
|
||||
|
@ -542,14 +542,18 @@ body.dashboard {
|
|||
.dashboard {
|
||||
background-color: white;
|
||||
}
|
||||
#sidebar_main{
|
||||
.dashboard #sidebar_main{
|
||||
background-color: #F0F4F2;
|
||||
}
|
||||
|
||||
.dashboard .md-card{
|
||||
background: #FFFFFF 0% 0% no-repeat padding-box;
|
||||
.dashboard .md-card {
|
||||
background: #FFFFFF no-repeat padding-box;
|
||||
box-shadow: 1px 10px 12px #00000026;
|
||||
border: 1px solid #E0E0E0;
|
||||
border-radius: 5px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.dashboard [class*="uk-icon-"][class*="uk-button-"]:not(.uk-button-default) {
|
||||
color: #fff;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,7 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-propert
|
|||
|
||||
export let properties: EnvProperties = {
|
||||
environment: "beta",
|
||||
isDashboard: true,
|
||||
enablePiwikTrack: true,
|
||||
useCache: true,
|
||||
showContent: true,
|
||||
|
|
|
@ -2,6 +2,7 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-propert
|
|||
|
||||
export let properties: EnvProperties = {
|
||||
environment: "production",
|
||||
isDashboard: true,
|
||||
enablePiwikTrack: false,
|
||||
useCache: true,
|
||||
showContent: true,
|
||||
|
@ -54,7 +55,7 @@ export let properties: EnvProperties = {
|
|||
|
||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||
|
||||
adminToolsCommunity: "connect",
|
||||
adminToolsCommunity: "monitor",
|
||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||
|
||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||
|
|
|
@ -7,6 +7,7 @@ import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-propert
|
|||
|
||||
export let properties: EnvProperties = {
|
||||
environment: "development",
|
||||
isDashboard: true,
|
||||
enablePiwikTrack: false,
|
||||
useCache: false,
|
||||
showContent: true,
|
||||
|
@ -59,7 +60,7 @@ export let properties: EnvProperties = {
|
|||
|
||||
adminToolsAPIURL: "http://mpagasas.di.uoa.gr:8080/uoa-admin-tools",
|
||||
|
||||
adminToolsCommunity: "connect",
|
||||
adminToolsCommunity: "monitor",
|
||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/",
|
||||
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
||||
communityAPI: "https://dev-openaire.d4science.org/openaire/community/",
|
||||
|
@ -73,6 +74,7 @@ export let properties: EnvProperties = {
|
|||
|
||||
afterLoginRedirectLink: "",
|
||||
|
||||
searchLinkToResult: "/search/result?id=",
|
||||
searchLinkToPublication: "/search/publication?articleId=",
|
||||
searchLinkToProject: "/search/project?projectId=",
|
||||
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
|
||||
|
@ -80,26 +82,17 @@ export let properties: EnvProperties = {
|
|||
searchLinkToSoftwareLanding: "/search/software?softwareId=",
|
||||
searchLinkToOrganization: "/search/organization?organizationId=",
|
||||
searchLinkToOrp: "/search/other?orpId=",
|
||||
|
||||
searchLinkToCommunities: "/search/find/communities",
|
||||
searchLinkToPublications: "/search/find/publications",
|
||||
searchLinkToResults: "/search/find/research-outcomes",
|
||||
searchLinkToDataProviders: "/search/find/dataproviders",
|
||||
searchLinkToProjects: "/search/find/projects",
|
||||
searchLinkToDatasets: "/search/find/datasets",
|
||||
searchLinkToSoftware: "/search/find/software",
|
||||
searchLinkToOrps: "/search/find/other",
|
||||
searchLinkToOrganizations: "/search/find/organizations",
|
||||
searchLinkToCompatibleDataProviders: "/search/content-providers",
|
||||
searchLinkToEntityRegistriesDataProviders: "/search/entity-registries",
|
||||
searchLinkToEntityRegistriesDataProvidersTable: "/search/entity-registries-table",
|
||||
searchLinkToJournals: "/search/journals",
|
||||
searchLinkToJournalsTable: "/search/journals-table",
|
||||
|
||||
searchLinkToAdvancedPublications: "/search/advanced/publications",
|
||||
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
|
||||
searchLinkToAdvancedProjects: "/search/advanced/projects",
|
||||
searchLinkToAdvancedDatasets: "/search/advanced/datasets",
|
||||
searchLinkToAdvancedSoftware: "/search/advanced/software",
|
||||
searchLinkToAdvancedOrps: "/search/advanced/other",
|
||||
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
|
||||
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
|
||||
lastIndexInformationLink: "https://beta.openaire.eu/aggregation-and-content-provision-workflows",
|
||||
|
|
|
@ -26,25 +26,16 @@
|
|||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
</head>
|
||||
<body class="app_my_theme dashboard">
|
||||
<div>
|
||||
<app-root></app-root>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
console.log("Is ready - load uikit ***")
|
||||
$.getScript("assets/theme-assets/uikit/js/uikit.min.js");
|
||||
$.getScript("assets/theme-assets/uikit/js/uikit-icons.min.js");
|
||||
});
|
||||
|
||||
</script>
|
||||
<script src="assets/theme-assets/js/common.min.js"></script>
|
||||
<script src="assets/theme-assets/js/altair_admin_common.min.js"></script>
|
||||
<script src="assets/theme-assets/uikit/js/uikit.min.js"></script>
|
||||
<!-- <script src="assets/theme-assets/js/uikit_custom.min.js"></script>-->
|
||||
<script src="assets/theme-assets/uikit/js/uikit-icons.min.js"></script>
|
||||
<script>
|
||||
if(Modernizr.touch) {
|
||||
// fastClick (touch devices)
|
||||
|
@ -59,22 +50,6 @@
|
|||
function loadAltmetrics(e, t, n) {
|
||||
var d = "createElement", c = "getElementsByTagName", m = "setAttribute", n = document.getElementById(e);
|
||||
return n && n.parentNode && n.parentNode.removeChild(n), n = document[d + "NS"] && document.documentElement.namespaceURI, n = n ? document[d + "NS"](n, "script") : document[d]("script"), n[m]("id", e), n[m]("src", t), (document[c]("head")[0] || document[c]("body")[0]).appendChild(n), n = new Image, void n[m]("src", "https://d1uo4w7k31k5mn.cloudfront.net/donut/0.png")
|
||||
};
|
||||
|
||||
function appendCss(customData) {
|
||||
if (typeof customData != "undefined")
|
||||
$(document).ready(function () {
|
||||
$("style").append(customData);
|
||||
});
|
||||
}
|
||||
|
||||
/* console.log("here!");
|
||||
var fileref=document.createElement("link");
|
||||
fileref.setAttribute("rel", "stylesheet");
|
||||
fileref.setAttribute("type", "text/css");
|
||||
fileref.setAttribute("href", "assets/customization.css");
|
||||
if (typeof fileref!="undefined")
|
||||
document.getElementsByTagName("head")[0].appendChild(fileref)
|
||||
}*/
|
||||
</script>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue