blob: 72da93bcce90a0ca0a521c860cd4acf4dfb5aa5b [file] [log] [blame]
Skip Wonnell2c977e22018-03-01 08:30:15 -06001/*
2============LICENSE_START==========================================
3===================================================================
4Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
5===================================================================
6
7Unless otherwise specified, all software contained herein is licensed
8under the Apache License, Version 2.0 (the License);
9you may not use this software except in compliance with the License.
10You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14Unless required by applicable law or agreed to in writing, software
15distributed under the License is distributed on an "AS IS" BASIS,
16WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17See the License for the specific language governing permissions and
18limitations under the License.
Skip Wonnell2c977e22018-03-01 08:30:15 -060019============LICENSE_END============================================
20*/
21
Skip Wonnell2c977e22018-03-01 08:30:15 -060022import {RouterModule, Routes} from '@angular/router';
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053023
Skip Wonnell2c977e22018-03-01 08:30:15 -060024import {AboutUsComponent} from './about-us/aboutus.component';
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053025import { CanActivate } from '@angular/router';
26import {HelpComponent} from './shared/components/help/help/help.component';
27import {HomeComponent} from './home/home/home.component';
28import { LoginGuardService } from './vnfs/LoginGuardService/Login-guard-service';
29import {LogoutComponent} from './shared/components/logout/logout.component';
30import {NgModule} from '@angular/core';
Skip Wonnell2c977e22018-03-01 08:30:15 -060031import {TestComponent} from './test/test.component';
asgaraf56b682019-03-08 19:52:33 +053032import {AdminComponent} from './admin/admin.component';
33import {AnsibleServerComponent} from './admin/view-edit/ansible-server.component';
34
Skip Wonnell2c977e22018-03-01 08:30:15 -060035
36const routes: Routes = [
37 {
38 path: 'home',
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053039 component: HomeComponent,
Skip Wonnell2c977e22018-03-01 08:30:15 -060040 }, {
41 path: 'vnfs',
42 loadChildren: './vnfs/vnfs.module#VnfsModule'
43 }, {
44 path: 'test',
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053045 component: TestComponent,
46 canActivate:[LoginGuardService]
Skip Wonnell2c977e22018-03-01 08:30:15 -060047 },
48 {
asgaraf56b682019-03-08 19:52:33 +053049 path: 'admin',
50 component: AdminComponent,
51 canActivate:[LoginGuardService]
52 },
53 {
54 path: 'ansible-server',
55 component: AnsibleServerComponent,
56 canActivate:[LoginGuardService]
57 },
58 {
Skip Wonnell2c977e22018-03-01 08:30:15 -060059 path: 'help',
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053060 component: HelpComponent,
61 canActivate:[LoginGuardService]
Skip Wonnell2c977e22018-03-01 08:30:15 -060062 }, {
63 path: 'aboutUs',
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053064 component: AboutUsComponent,
65 canActivate:[LoginGuardService]
Skip Wonnell2c977e22018-03-01 08:30:15 -060066 }, {
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)d7dffc22018-04-02 19:00:49 +053078
79exports: [RouterModule]
Skip Wonnell2c977e22018-03-01 08:30:15 -060080})
81export class AppRoutingModule {
Mohamed Asgar Samiulla(ma926a)d7dffc22018-04-02 19:00:49 +053082}