Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 1 | /* |
| 2 | ============LICENSE_START========================================== |
| 3 | =================================================================== |
| 4 | Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. |
| 5 | =================================================================== |
| 6 | |
| 7 | Unless otherwise specified, all software contained herein is licensed |
| 8 | under the Apache License, Version 2.0 (the License); |
| 9 | you may not use this software except in compliance with the License. |
| 10 | You may obtain a copy of the License at |
| 11 | |
| 12 | http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | |
| 14 | Unless required by applicable law or agreed to in writing, software |
| 15 | distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | See the License for the specific language governing permissions and |
| 18 | limitations under the License. |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 19 | ============LICENSE_END============================================ |
| 20 | */ |
| 21 | |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 22 | import {RouterModule, Routes} from '@angular/router'; |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 23 | |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 24 | import {AboutUsComponent} from './about-us/aboutus.component'; |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 25 | import { CanActivate } from '@angular/router'; |
| 26 | import {HelpComponent} from './shared/components/help/help/help.component'; |
| 27 | import {HomeComponent} from './home/home/home.component'; |
| 28 | import { LoginGuardService } from './vnfs/LoginGuardService/Login-guard-service'; |
| 29 | import {LogoutComponent} from './shared/components/logout/logout.component'; |
| 30 | import {NgModule} from '@angular/core'; |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 31 | import {TestComponent} from './test/test.component'; |
asgar | af56b68 | 2019-03-08 19:52:33 +0530 | [diff] [blame] | 32 | import {AdminComponent} from './admin/admin.component'; |
| 33 | import {AnsibleServerComponent} from './admin/view-edit/ansible-server.component'; |
| 34 | |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 35 | |
| 36 | const routes: Routes = [ |
| 37 | { |
| 38 | path: 'home', |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 39 | component: HomeComponent, |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 40 | }, { |
| 41 | path: 'vnfs', |
| 42 | loadChildren: './vnfs/vnfs.module#VnfsModule' |
| 43 | }, { |
| 44 | path: 'test', |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 45 | component: TestComponent, |
| 46 | canActivate:[LoginGuardService] |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 47 | }, |
| 48 | { |
asgar | af56b68 | 2019-03-08 19:52:33 +0530 | [diff] [blame] | 49 | path: 'admin', |
| 50 | component: AdminComponent, |
| 51 | canActivate:[LoginGuardService] |
| 52 | }, |
| 53 | { |
| 54 | path: 'ansible-server', |
| 55 | component: AnsibleServerComponent, |
| 56 | canActivate:[LoginGuardService] |
| 57 | }, |
| 58 | { |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 59 | path: 'help', |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 60 | component: HelpComponent, |
| 61 | canActivate:[LoginGuardService] |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 62 | }, { |
| 63 | path: 'aboutUs', |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 64 | component: AboutUsComponent, |
| 65 | canActivate:[LoginGuardService] |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 66 | }, { |
| 67 | path: 'logout', |
| 68 | component: LogoutComponent |
| 69 | }, { |
| 70 | path: '', |
| 71 | redirectTo: '/home', |
| 72 | pathMatch: 'full' |
| 73 | } |
| 74 | ]; |
| 75 | |
| 76 | @NgModule({ |
| 77 | imports: [RouterModule.forRoot(routes)], |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 78 | |
| 79 | exports: [RouterModule] |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 80 | }) |
| 81 | export class AppRoutingModule { |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 82 | } |