71 lines
2.6 KiB
TypeScript
71 lines
2.6 KiB
TypeScript
/*
|
|
* Copyright (c) 2016 VMware, Inc. All Rights Reserved.
|
|
* This software is released under MIT license.
|
|
* The full license information can be found in LICENSE in the root directory of this project.
|
|
*/
|
|
import { ModuleWithProviders } from '@angular/core'
|
|
import { Routes, RouterModule } from '@angular/router'
|
|
|
|
import { HomeComponent } from './home/home.component'
|
|
import { ApproveComponent } from './approve/approve.component'
|
|
import { ApproveDetailsComponent } from './approve-details/approve-details.component'
|
|
import { ActionsComponent } from './actions/actions.component'
|
|
import { HistoryComponent } from './history/history.component'
|
|
import { NotFoundComponent } from './not-found/not-found.component'
|
|
import { SubmitterComponent } from './submitter/submitter.component'
|
|
|
|
import { ApproveRouteComponent } from './routes/approve-route/approve-route.component'
|
|
import { DeployComponent } from './deploy/deploy.component'
|
|
import { LicensingComponent } from './licensing/licensing.component'
|
|
import { LicensingGuard } from './routes/licensing.guard'
|
|
import { StageModule } from './stage/stage.module'
|
|
import { EditorModule } from './editor/editor.module'
|
|
import { ViewerModule } from './viewer/viewer.module'
|
|
import { SystemComponent } from './system/system.component'
|
|
|
|
export const ROUTES: Routes = [
|
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
|
{
|
|
path: 'view',
|
|
loadChildren: () => ViewerModule
|
|
},
|
|
{
|
|
path: 'approve',
|
|
component: ApproveRouteComponent,
|
|
children: [
|
|
{ path: '', pathMatch: 'full', redirectTo: 'toapprove' },
|
|
{ path: 'toapprove', component: ApproveComponent },
|
|
{ path: 'approveDet/:tableId', component: ApproveDetailsComponent },
|
|
{ path: 'submitted', component: SubmitterComponent }
|
|
]
|
|
},
|
|
{
|
|
path: 'licensing/:action',
|
|
component: LicensingComponent,
|
|
canActivate: [LicensingGuard],
|
|
canDeactivate: [LicensingGuard]
|
|
},
|
|
{ path: 'home', component: HomeComponent },
|
|
{
|
|
path: 'editor',
|
|
loadChildren: () => EditorModule
|
|
},
|
|
{
|
|
path: 'stage',
|
|
loadChildren: () => StageModule
|
|
},
|
|
{ path: 'system', component: SystemComponent },
|
|
{ path: 'actions/:libds/:dsid', component: ActionsComponent },
|
|
{ path: 'history', component: HistoryComponent },
|
|
{ path: 'submitted', component: SubmitterComponent },
|
|
{ path: 'submitted/:tableId', component: SubmitterComponent },
|
|
{ path: 'deploy', component: DeployComponent },
|
|
{ path: 'deploy/manualdeploy', component: DeployComponent },
|
|
{ path: '**', component: NotFoundComponent }
|
|
]
|
|
|
|
export const ROUTING: ModuleWithProviders<RouterModule> = RouterModule.forRoot(
|
|
ROUTES,
|
|
{ useHash: true }
|
|
)
|