[Monitor_Dashboard|Trunk]

create routing modules for amdin pages (entities, pages, portals, helptexts)
rename home component to manage stakeholders




git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@57950 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2019-12-23 16:36:53 +00:00
parent 246e611474
commit 2ce488027a
27 changed files with 321 additions and 25 deletions

View File

@ -25,7 +25,7 @@ const routes: Routes = [
},
{
path: 'admin',
loadChildren: './home/home.module#HomeModule',
loadChildren: './manageStakeholders/manageStakeholders.module#ManageStakeholdersModule',
resolve: {envSpecific: EnvironmentSpecificResolver},
data: {hasAdminMenu: true}
},
@ -45,61 +45,61 @@ const routes: Routes = [
/* Library paths*/
{
path: 'portals',
loadChildren: './openaireLibrary/dashboard/portal/communities.module#CommunitiesModule',
loadChildren: './portals/portals.module#PortalsModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'entities',
loadChildren: './openaireLibrary/dashboard/entity/entities.module#EntitiesModule',
loadChildren: './entities/entities.module#MonitorEntitiesModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'classes',
loadChildren: './openaireLibrary/dashboard/divId/divIds.module#DivIdsModule',
loadChildren: './classes/classes.module#ClassesModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'classContents',
loadChildren: './openaireLibrary/dashboard/divhelpcontent/div-help-contents.module#DivHelpContentsModule',
loadChildren: './classHelpTexts/div-help-contents.module#MonitorDivHelpContentsModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'classContents/new',
loadChildren: './openaireLibrary/dashboard/divhelpcontent/new-div-help-content.module#NewDivHelpContentModule',
loadChildren: './classHelpTexts/new-div-help-content.module#MonitorNewDivHelpContentModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'classContents/edit',
loadChildren: './openaireLibrary/dashboard/divhelpcontent/edit-div-help-content.module#EditDivHelpContentModule',
loadChildren: './classHelpTexts/edit-div-help-content.module#MonitorEditDivHelpContentModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'helptexts',
loadChildren: './openaireLibrary/dashboard/helpTexts/page-help-contents.module#PageHelpContentsModule',
loadChildren: './helpTexts/page-help-contents.module#MonitorPageHelpContentsModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'helptexts/new',
loadChildren: './openaireLibrary/dashboard/helpTexts/new-page-help-content.module#NewPageHelpContentModule',
loadChildren: './helpTexts/new-page-help-content.module#MonitorNewPageHelpContentModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'helptexts/edit',
loadChildren: './openaireLibrary/dashboard/helpTexts/edit-page-help-content.module#EditPageHelpContentModule',
loadChildren: './helpTexts/edit-page-help-content.module#MonitorEditPageHelpContentModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},
{
path: 'pages',
loadChildren: './openaireLibrary/dashboard/page/pages.module#PagesModule',
loadChildren: './pages/pages.module#MonitorPagesModule',
resolve: { envSpecific: EnvironmentSpecificResolver },
data: {hasAdminMenu: true}
},

View File

@ -8,7 +8,6 @@ import {AppComponent} from './app.component';
import {OpenaireErrorPageComponent} from './error/errorPage.component';
import {AppRoutingModule} from './app-routing.module';
import {SharedModule} from './shared/shared.module';
import {CookieLawModule} from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module';
import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module';
import {ErrorModule} from './openaireLibrary/error/error.module';
@ -18,6 +17,7 @@ import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/en
import {SubscribeModule} from './utils/subscribe/subscribe.module';
import {UserMiniModule} from "./openaireLibrary/login/userMiniModule.module";
import {SideBarModule} from "./openaireLibrary/dashboard/sharedComponents/sidebar/sideBar.module";
import {SharedModule} from "./openaireLibrary/shared/shared.module";
@NgModule({

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {DivHelpContentsComponent} from "../openaireLibrary/dashboard/divhelpcontent/div-help-contents.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: DivHelpContentsComponent}
])
]
})
export class DivHelpContentsRoutingModule { }

View File

@ -0,0 +1,15 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {DivHelpContentsRoutingModule} from './div-help-contents-routing.module';
import {DivHelpContentsModule} from "../openaireLibrary/dashboard/divhelpcontent/div-help-contents.module";
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
@NgModule({
imports: [
CommonModule, DivHelpContentsRoutingModule, DivHelpContentsModule
],
providers: [IsCommunity, ConnectAdminLoginGuard],
})
export class MonitorDivHelpContentsModule { }

View File

@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {EditDivHelpContentComponent} from "../openaireLibrary/dashboard/divhelpcontent/edit-div-help-content.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: EditDivHelpContentComponent}
])
]
})
export class EditDivHelpContentRoutingModule { }

View File

@ -0,0 +1,15 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {EditDivHelpContentRoutingModule} from './edit-div-help-content-routing.module';
import {EditDivHelpContentModule} from "../openaireLibrary/dashboard/divhelpcontent/edit-div-help-content.module";
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
@NgModule({
imports: [
CommonModule, EditDivHelpContentRoutingModule, EditDivHelpContentModule
],
providers: [IsCommunity, ConnectAdminLoginGuard],
})
export class MonitorEditDivHelpContentModule { }

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {NewDivHelpContentComponent} from "../openaireLibrary/dashboard/divhelpcontent/new-div-help-content.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: NewDivHelpContentComponent}
])
]
})
export class NewDivHelpContentRoutingModule { }

View File

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {CommonModule} from '@angular/common';
import {NewDivHelpContentRoutingModule} from "./new-div-help-content-routing.module";
import {NewDivHelpContentModule} from "../openaireLibrary/dashboard/divhelpcontent/new-div-help-content.module";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
@NgModule({
imports: [
CommonModule, NewDivHelpContentRoutingModule, NewDivHelpContentModule
],
providers: [IsCommunity, ConnectAdminLoginGuard],
})
export class MonitorNewDivHelpContentModule { }

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
import {DivIdsComponent} from "../openaireLibrary/dashboard/divId/divIds.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [AdminLoginGuard], component: DivIdsComponent}
])
]
})
export class ClassesRoutingModule { }

View File

@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import {ClassesRoutingModule} from "./classes-routing.module";
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
import {DivIdsModule} from "../openaireLibrary/dashboard/divId/divIds.module";
import {CommonModule} from "@angular/common";
@NgModule({
imports: [
CommonModule, ClassesRoutingModule, DivIdsModule
],
providers: [AdminLoginGuard],
})
export class ClassesModule { }

View File

@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
import {EntitiesComponent} from "../openaireLibrary/dashboard/entity/entities.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [AdminLoginGuard], component: EntitiesComponent}
])
]
})
export class EntitiesRoutingModule { }

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {EntitiesRoutingModule} from "./entities-routing.module";
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
import {EntitiesModule} from "../openaireLibrary/dashboard/entity/entities.module";
@NgModule({
imports: [
CommonModule, EntitiesModule, EntitiesRoutingModule
],
providers: [AdminLoginGuard],
})
export class MonitorEntitiesModule {
}

View File

@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {EditPageHelpContentComponent} from "../openaireLibrary/dashboard/helpTexts/edit-page-help-content.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: EditPageHelpContentComponent}
])
]
})
export class EditPageHelpContentRoutingModule { }

View File

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {CommonModule} from '@angular/common';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {EditPageHelpContentRoutingModule} from "./edit-page-help-content-routing.module";
import {EditPageHelpContentModule} from "../openaireLibrary/dashboard/helpTexts/edit-page-help-content.module";
@NgModule({
imports: [
CommonModule, RouterModule,
EditPageHelpContentRoutingModule, EditPageHelpContentModule
],
providers: [IsCommunity, ConnectAdminLoginGuard]
})
export class MonitorEditPageHelpContentModule { }

View File

@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {NewPageHelpContentComponent} from "../openaireLibrary/dashboard/helpTexts/new-page-help-content.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: NewPageHelpContentComponent}
])
]
})
export class NewPageHelpContentRoutingModule { }

View File

@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {CommonModule} from '@angular/common';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {NewPageHelpContentRoutingModule} from "./new-page-help-content-routing.module";
import {NewPageHelpContentModule} from "../openaireLibrary/dashboard/helpTexts/new-page-help-content.module";
@NgModule({
imports: [
CommonModule, RouterModule,
NewPageHelpContentRoutingModule, NewPageHelpContentModule
],
providers: [IsCommunity, ConnectAdminLoginGuard],
})
export class MonitorNewPageHelpContentModule { }

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {PageHelpContentsComponent} from "../openaireLibrary/dashboard/helpTexts/page-help-contents.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: PageHelpContentsComponent}
])
]
})
export class PageHelpContentsRoutingModule { }

View File

@ -0,0 +1,14 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PageHelpContentsRoutingModule} from './page-help-contents-routing.module';
import {PageHelpContentsModule} from "../openaireLibrary/dashboard/helpTexts/page-help-contents.module";
import {IsCommunity} from "../openaireLibrary/connect/communityGuard/isCommunity.guard";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
@NgModule({
imports: [
CommonModule, PageHelpContentsRoutingModule, PageHelpContentsModule
],
providers: [IsCommunity, ConnectAdminLoginGuard],
})
export class MonitorPageHelpContentsModule { }

View File

@ -2,14 +2,14 @@ import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {HomeComponent} from "./home.component";
import {ManageStakeholdersComponent} from "./manageStakeholders.component";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: HomeComponent,
component: ManageStakeholdersComponent,
canActivate: [FreeGuard],
canDeactivate: [PreviousRouteRecorder],
data: {hasSidebar: true}
@ -17,5 +17,5 @@ import {HomeComponent} from "./home.component";
])
]
})
export class HomeRoutingModule {
export class ManageStakeholdersRoutingModule {
}

View File

@ -4,17 +4,18 @@ import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"
import {EnvironmentSpecificService} from "../openaireLibrary/utils/properties/environment-specific.service";
import {Stakeholder} from "../utils/entities/stakeholder";
import {Subscriber, zip} from "rxjs";
import {Option, StakeholderUtils} from "../utils/indicator-utils";
import {StakeholderUtils} from "../utils/indicator-utils";
import {FormBuilder, FormGroup, Validators} from "@angular/forms";
import {AlertModal} from "../openaireLibrary/utils/modal/alert";
import {StakeholderCreator} from "../utils/entities/stakeholderCreator";
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
import {Option} from "../openaireLibrary/dashboard/sharedComponents/input/input.component";
@Component({
selector: 'home',
templateUrl: "./home.component.html"
templateUrl: "./manageStakeholders.component.html"
})
export class HomeComponent implements OnInit, OnDestroy {
export class ManageStakeholdersComponent implements OnInit, OnDestroy {
public properties: EnvProperties;
public loading: boolean = true;

View File

@ -1,6 +1,6 @@
import {NgModule} from "@angular/core";
import {HomeComponent} from "./home.component";
import {HomeRoutingModule} from "./home-routing.module";
import {ManageStakeholdersComponent} from "./manageStakeholders.component";
import {ManageStakeholdersRoutingModule} from "./manageStakeholders-routing.module";
import {FreeGuard} from "../openaireLibrary/login/freeGuard.guard";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {CommonModule} from "@angular/common";
@ -11,9 +11,9 @@ import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module
import {ReactiveFormsModule} from "@angular/forms";
@NgModule({
declarations: [HomeComponent],
declarations: [ManageStakeholdersComponent],
imports: [
HomeRoutingModule,
ManageStakeholdersRoutingModule,
CommonModule,
RouterModule,
InputModule,
@ -24,8 +24,8 @@ import {ReactiveFormsModule} from "@angular/forms";
providers: [
FreeGuard, PreviousRouteRecorder,
],
exports: [HomeComponent]
exports: [ManageStakeholdersComponent]
})
export class HomeModule {
export class ManageStakeholdersModule {
}

View File

@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {PagesComponent} from "../openaireLibrary/dashboard/page/pages.component";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {IsCommunityOrAdmin} from "../openaireLibrary/connect/communityGuard/isCommunityOrAdmin";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [IsCommunityOrAdmin, ConnectAdminLoginGuard], component: PagesComponent}
])
]
})
export class PagesRoutingModule { }

View File

@ -0,0 +1,15 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PagesRoutingModule} from './pages-routing.module';
import {IsCommunityOrAdmin} from "../openaireLibrary/connect/communityGuard/isCommunityOrAdmin";
import {ConnectAdminLoginGuard} from "../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
import {PagesModule} from "../openaireLibrary/dashboard/page/pages.module";
@NgModule({
imports: [
CommonModule, PagesRoutingModule, PagesModule
],
providers: [IsCommunityOrAdmin, ConnectAdminLoginGuard],
})
export class MonitorPagesModule { }

View File

@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import {RouterModule} from '@angular/router';
import {CommunitiesComponent} from "../openaireLibrary/dashboard/portal/communities.component";
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [AdminLoginGuard], component: CommunitiesComponent}
])
]
})
export class PortalsRoutingModule { }

View File

@ -0,0 +1,16 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {CommunitiesModule} from "../openaireLibrary/dashboard/portal/communities.module";
import {AdminLoginGuard} from "../openaireLibrary/login/adminLoginGuard.guard";
import {PortalsRoutingModule} from "./portals-routing.module";
@NgModule({
imports: [
CommonModule, CommunitiesModule, PortalsRoutingModule
],
declarations: [],
providers: [AdminLoginGuard],
exports: []
})
export class PortalsModule {
}

View File

@ -1,6 +1,6 @@
import {AfterViewInit, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild} from "@angular/core";
import {Indicator, IndicatorPath, Stakeholder} from "../utils/entities/stakeholder";
import {IndicatorUtils, Option} from "../utils/indicator-utils";
import {IndicatorUtils} from "../utils/indicator-utils";
import {FormArray, FormBuilder, FormControl, FormGroup, Validators} from "@angular/forms";
import {AlertModal} from "../openaireLibrary/utils/modal/alert";
import {StatisticsService} from "../utils/services/statistics.service";
@ -10,6 +10,7 @@ import {StakeholderService} from "../services/stakeholder.service";
import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties";
import {Subscriber} from "rxjs";
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
import {Option} from "../openaireLibrary/dashboard/sharedComponents/input/input.component";
declare var UIkit;