@@ -11,10 +11,12 @@ import {
1111 FORBIDDEN_PATH ,
1212 FORGOT_PASSWORD_PATH ,
1313 INFO_MODULE_PATH ,
14+ INTERNAL_SERVER_ERROR ,
15+ LEGACY_BITSTREAM_MODULE_PATH ,
1416 PROFILE_MODULE_PATH ,
1517 REGISTER_PATH ,
18+ REQUEST_COPY_MODULE_PATH ,
1619 WORKFLOW_ITEM_MODULE_PATH ,
17- LEGACY_BITSTREAM_MODULE_PATH , REQUEST_COPY_MODULE_PATH ,
1820} from './app-routing-paths' ;
1921import { COLLECTION_MODULE_PATH } from './collection-page/collection-page-routing-paths' ;
2022import { COMMUNITY_MODULE_PATH } from './community-page/community-page-routing-paths' ;
@@ -26,14 +28,25 @@ import { SiteRegisterGuard } from './core/data/feature-authorization/feature-aut
2628import { ThemedPageNotFoundComponent } from './pagenotfound/themed-pagenotfound.component' ;
2729import { ThemedForbiddenComponent } from './forbidden/themed-forbidden.component' ;
2830import { GroupAdministratorGuard } from './core/data/feature-authorization/feature-authorization-guard/group-administrator.guard' ;
31+ import { ThemedPageInternalServerErrorComponent } from './page-internal-server-error/themed-page-internal-server-error.component' ;
32+ import { ServerCheckGuard } from './core/server-check/server-check.guard' ;
2933
3034@NgModule ( {
3135 imports : [
32- RouterModule . forRoot ( [ {
33- path : '' , canActivate : [ AuthBlockingGuard ] ,
36+ RouterModule . forRoot ( [
37+ { path : INTERNAL_SERVER_ERROR , component : ThemedPageInternalServerErrorComponent } ,
38+ {
39+ path : '' ,
40+ canActivate : [ AuthBlockingGuard ] ,
41+ canActivateChild : [ ServerCheckGuard ] ,
3442 children : [
3543 { path : '' , redirectTo : '/home' , pathMatch : 'full' } ,
36- { path : 'reload/:rnd' , component : ThemedPageNotFoundComponent , pathMatch : 'full' , canActivate : [ ReloadGuard ] } ,
44+ {
45+ path : 'reload/:rnd' ,
46+ component : ThemedPageNotFoundComponent ,
47+ pathMatch : 'full' ,
48+ canActivate : [ ReloadGuard ]
49+ } ,
3750 {
3851 path : 'home' ,
3952 loadChildren : ( ) => import ( './home-page/home-page.module' )
@@ -89,7 +102,8 @@ import { GroupAdministratorGuard } from './core/data/feature-authorization/featu
89102 . then ( ( m ) => m . ItemPageModule ) ,
90103 canActivate : [ EndUserAgreementCurrentUserGuard ]
91104 } ,
92- { path : 'entities/:entity-type' ,
105+ {
106+ path : 'entities/:entity-type' ,
93107 loadChildren : ( ) => import ( './item-page/item-page.module' )
94108 . then ( ( m ) => m . ItemPageModule ) ,
95109 canActivate : [ EndUserAgreementCurrentUserGuard ]
@@ -133,12 +147,12 @@ import { GroupAdministratorGuard } from './core/data/feature-authorization/featu
133147 {
134148 path : 'login' ,
135149 loadChildren : ( ) => import ( './login-page/login-page.module' )
136- . then ( ( m ) => m . LoginPageModule ) ,
150+ . then ( ( m ) => m . LoginPageModule )
137151 } ,
138152 {
139153 path : 'logout' ,
140154 loadChildren : ( ) => import ( './logout-page/logout-page.module' )
141- . then ( ( m ) => m . LogoutPageModule ) ,
155+ . then ( ( m ) => m . LogoutPageModule )
142156 } ,
143157 {
144158 path : 'submit' ,
@@ -178,7 +192,7 @@ import { GroupAdministratorGuard } from './core/data/feature-authorization/featu
178192 } ,
179193 {
180194 path : INFO_MODULE_PATH ,
181- loadChildren : ( ) => import ( './info/info.module' ) . then ( ( m ) => m . InfoModule ) ,
195+ loadChildren : ( ) => import ( './info/info.module' ) . then ( ( m ) => m . InfoModule )
182196 } ,
183197 {
184198 path : REQUEST_COPY_MODULE_PATH ,
@@ -192,17 +206,18 @@ import { GroupAdministratorGuard } from './core/data/feature-authorization/featu
192206 {
193207 path : 'statistics' ,
194208 loadChildren : ( ) => import ( './statistics-page/statistics-page-routing.module' )
195- . then ( ( m ) => m . StatisticsPageRoutingModule ) ,
209+ . then ( ( m ) => m . StatisticsPageRoutingModule )
196210 } ,
197211 {
198212 path : ACCESS_CONTROL_MODULE_PATH ,
199213 loadChildren : ( ) => import ( './access-control/access-control.module' ) . then ( ( m ) => m . AccessControlModule ) ,
200214 canActivate : [ GroupAdministratorGuard ] ,
201215 } ,
202216 { path : '**' , pathMatch : 'full' , component : ThemedPageNotFoundComponent } ,
203- ] }
204- ] , {
205- onSameUrlNavigation : 'reload' ,
217+ ]
218+ }
219+ ] , {
220+ onSameUrlNavigation : 'reload' ,
206221} )
207222 ] ,
208223 exports : [ RouterModule ] ,
0 commit comments