| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 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 |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 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. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 18 | /* eslint-disable @typescript-eslint/no-explicit-any */ |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 19 | /** |
| 20 | * @file Routing Module |
| 21 | */ |
| 22 | import { Routes } from '@angular/router'; |
| 23 | import { AuthGuardService } from 'AuthGuardService'; |
| SANDHYA.JS | a981655 | 2022-04-12 09:07:08 +0530 | [diff] [blame] | 24 | import { ChangePasswordComponent } from 'ChangePasswordComponent'; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 25 | import { LayoutComponent } from 'LayoutComponent'; |
| 26 | import { LoginComponent } from 'LoginComponent'; |
| 27 | import { PageNotFoundComponent } from 'PageNotFound'; |
| 28 | |
| 29 | /** Exporting a function using Routes @exports AppRoutes */ |
| 30 | export const appRoutes: Routes = [ |
| 31 | { |
| 32 | path: 'login', |
| 33 | component: LoginComponent |
| 34 | }, |
| 35 | { |
| 36 | path: '', |
| 37 | component: LayoutComponent, |
| 38 | canActivate: [AuthGuardService], |
| 39 | children: [ |
| 40 | { |
| 41 | path: '', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 42 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 43 | loadChildren: async (): Promise<any> => import('./dashboard/DashboardModule') |
| 44 | .then((m: typeof import('./dashboard/DashboardModule')) => m.DashboardModule), |
| 45 | canActivate: [AuthGuardService] |
| 46 | }, |
| 47 | { |
| 48 | path: 'packages', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 49 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 50 | loadChildren: async (): Promise<any> => import('./packages/PackagesModule') |
| 51 | .then((m: typeof import('./packages/PackagesModule')) => m.PackagesModule), |
| 52 | canActivate: [AuthGuardService] |
| 53 | }, |
| 54 | { |
| 55 | path: 'instances', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 56 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 57 | loadChildren: async (): Promise<any> => import('./instances/InstancesModule') |
| 58 | .then((m: typeof import('./instances/InstancesModule')) => m.InstancesModule), |
| 59 | canActivate: [AuthGuardService] |
| 60 | }, |
| 61 | { |
| 62 | path: 'vim', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 63 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 64 | loadChildren: async (): Promise<any> => import('./vim-accounts/VimAccountsModule') |
| 65 | .then((m: typeof import('./vim-accounts/VimAccountsModule')) => m.VimAccountsModule), |
| 66 | canActivate: [AuthGuardService] |
| 67 | }, |
| 68 | { |
| 69 | path: 'wim', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 70 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 71 | loadChildren: async (): Promise<any> => import('./wim-accounts/WIMAccountsModule') |
| 72 | .then((m: typeof import('./wim-accounts/WIMAccountsModule')) => m.WIMAccountsModule), |
| 73 | canActivate: [AuthGuardService] |
| 74 | }, |
| 75 | { |
| 76 | path: 'sdn', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 77 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 78 | loadChildren: async (): Promise<any> => import('./sdn-controller/SDNControllerModule') |
| 79 | .then((m: typeof import('./sdn-controller/SDNControllerModule')) => m.SDNControllerModule), |
| 80 | canActivate: [AuthGuardService] |
| 81 | }, |
| 82 | { |
| 83 | path: 'users', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 84 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 85 | loadChildren: async (): Promise<any> => import('./users/UsersModule') |
| 86 | .then((m: typeof import('./users/UsersModule')) => m.UsersModule), |
| 87 | canActivate: [AuthGuardService] |
| 88 | }, |
| 89 | { |
| 90 | path: 'projects', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 91 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 92 | loadChildren: async (): Promise<any> => import('./projects/ProjectsModule') |
| 93 | .then((m: typeof import('./projects/ProjectsModule')) => m.ProjectsModule), |
| 94 | canActivate: [AuthGuardService] |
| 95 | }, |
| 96 | { |
| 97 | path: 'roles', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 98 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 99 | loadChildren: async (): Promise<any> => import('./roles/RolesModule') |
| 100 | .then((m: typeof import('./roles/RolesModule')) => m.RolesModule), |
| 101 | canActivate: [AuthGuardService] |
| 102 | }, |
| 103 | { |
| 104 | path: 'k8s', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 105 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 106 | loadChildren: async (): Promise<any> => import('./k8s/K8sModule') |
| 107 | .then((m: typeof import('./k8s/K8sModule')) => m.K8sModule), |
| 108 | canActivate: [AuthGuardService] |
| Barath Kumar R | 403234e | 2020-07-07 15:48:58 +0530 | [diff] [blame] | 109 | }, |
| 110 | { |
| 111 | path: 'repos', |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame] | 112 | // eslint-disable-next-line node/no-unsupported-features/es-syntax |
| Barath Kumar R | 403234e | 2020-07-07 15:48:58 +0530 | [diff] [blame] | 113 | loadChildren: async (): Promise<any> => import('./osm-repositories/OsmRepositoriesModule') |
| 114 | .then((m: typeof import('./osm-repositories/OsmRepositoriesModule')) => m.OsmRepositoriesModule), |
| 115 | canActivate: [AuthGuardService] |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 116 | } |
| 117 | ] |
| 118 | }, |
| 119 | { |
| SANDHYA.JS | a981655 | 2022-04-12 09:07:08 +0530 | [diff] [blame] | 120 | path: 'changepassword', |
| 121 | component: ChangePasswordComponent, |
| 122 | canActivate: [AuthGuardService] |
| 123 | }, |
| 124 | { |
| SANDHYA.JS | 6c68608 | 2024-06-10 21:39:41 +0530 | [diff] [blame^] | 125 | path: 'forgotpassword', |
| 126 | component: ChangePasswordComponent |
| 127 | }, |
| 128 | { |
| 129 | path: 'forgotpassword/changepassword/:id', |
| 130 | component: ChangePasswordComponent, |
| 131 | canActivate: [AuthGuardService] |
| 132 | }, |
| 133 | { |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 134 | path: '**', |
| 135 | component: PageNotFoundComponent |
| 136 | } |
| 137 | ]; |