2 Copyright 2020 TATA ELXSI
4 Licensed under the Apache License, Version 2.0 (the 'License');
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
19 * @file Routing Module
21 import { Routes } from '@angular/router';
22 import { AuthGuardService } from 'AuthGuardService';
23 import { ChangePasswordComponent } from 'ChangePasswordComponent';
24 import { LayoutComponent } from 'LayoutComponent';
25 import { LoginComponent } from 'LoginComponent';
26 import { PageNotFoundComponent } from 'PageNotFound';
28 /** Exporting a function using Routes @exports AppRoutes */
29 export const appRoutes: Routes = [
32 component: LoginComponent
36 component: LayoutComponent,
37 canActivate: [AuthGuardService],
41 // tslint:disable-next-line: no-any
42 loadChildren: async (): Promise<any> => import('./dashboard/DashboardModule')
43 .then((m: typeof import('./dashboard/DashboardModule')) => m.DashboardModule),
44 canActivate: [AuthGuardService]
48 // tslint:disable-next-line: no-any
49 loadChildren: async (): Promise<any> => import('./packages/PackagesModule')
50 .then((m: typeof import('./packages/PackagesModule')) => m.PackagesModule),
51 canActivate: [AuthGuardService]
55 // tslint:disable-next-line: no-any
56 loadChildren: async (): Promise<any> => import('./instances/InstancesModule')
57 .then((m: typeof import('./instances/InstancesModule')) => m.InstancesModule),
58 canActivate: [AuthGuardService]
62 // tslint:disable-next-line: no-any
63 loadChildren: async (): Promise<any> => import('./vim-accounts/VimAccountsModule')
64 .then((m: typeof import('./vim-accounts/VimAccountsModule')) => m.VimAccountsModule),
65 canActivate: [AuthGuardService]
69 // tslint:disable-next-line: no-any
70 loadChildren: async (): Promise<any> => import('./wim-accounts/WIMAccountsModule')
71 .then((m: typeof import('./wim-accounts/WIMAccountsModule')) => m.WIMAccountsModule),
72 canActivate: [AuthGuardService]
76 // tslint:disable-next-line: no-any
77 loadChildren: async (): Promise<any> => import('./sdn-controller/SDNControllerModule')
78 .then((m: typeof import('./sdn-controller/SDNControllerModule')) => m.SDNControllerModule),
79 canActivate: [AuthGuardService]
83 // tslint:disable-next-line: no-any
84 loadChildren: async (): Promise<any> => import('./users/UsersModule')
85 .then((m: typeof import('./users/UsersModule')) => m.UsersModule),
86 canActivate: [AuthGuardService]
90 // tslint:disable-next-line: no-any
91 loadChildren: async (): Promise<any> => import('./projects/ProjectsModule')
92 .then((m: typeof import('./projects/ProjectsModule')) => m.ProjectsModule),
93 canActivate: [AuthGuardService]
97 // tslint:disable-next-line: no-any
98 loadChildren: async (): Promise<any> => import('./roles/RolesModule')
99 .then((m: typeof import('./roles/RolesModule')) => m.RolesModule),
100 canActivate: [AuthGuardService]
104 // tslint:disable-next-line: no-any
105 loadChildren: async (): Promise<any> => import('./k8s/K8sModule')
106 .then((m: typeof import('./k8s/K8sModule')) => m.K8sModule),
107 canActivate: [AuthGuardService]
111 // tslint:disable-next-line: no-any
112 loadChildren: async (): Promise<any> => import('./osm-repositories/OsmRepositoriesModule')
113 .then((m: typeof import('./osm-repositories/OsmRepositoriesModule')) => m.OsmRepositoriesModule),
114 canActivate: [AuthGuardService]
119 path: 'changepassword',
120 component: ChangePasswordComponent,
121 canActivate: [AuthGuardService]
125 component: PageNotFoundComponent