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 | |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 22 | import { RouterModule, Routes } from '@angular/router'; |
| 23 | |
| 24 | import { BuildDesignComponent } from './build-artifacts/build-artifacts.component'; |
| 25 | import { GoldenConfigurationComponent } from './build-artifacts/template-holder/template-configuration/template-configuration.component'; |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 26 | import { GoldenConfigurationHolderComponent, } from './build-artifacts/template-holder/template-holder.component'; |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 27 | import { GoldenConfigurationMappingComponent } from './build-artifacts/template-holder/param-name-value/param-name-value.component'; |
| 28 | import { LoginGuardService } from './LoginGuardService/Login-guard-service'; |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 29 | import { MyvnfsComponent } from './myvnfs/myvnfs.component'; |
| 30 | import { NgModule } from '@angular/core'; |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 31 | import { ParameterComponent } from './build-artifacts/parameter-definitions/parameter.component'; |
| 32 | import { ParameterHolderComponent } from './build-artifacts/parameter-holder/parameter-holder.component'; |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 33 | import { ReferenceDataHolderComponent } from './build-artifacts/reference-data-holder/reference-data-holder.component'; |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 34 | import { ReferenceDataformComponent } from './build-artifacts/reference-dataform/reference-dataform.component'; |
| 35 | import { VnfsComponent } from './vnfs/vnfs.component'; |
| 36 | import { userloginFormComponent } from './userlogin-form/userlogin-form.component'; |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 37 | |
| 38 | const routes: Routes = [ |
| 39 | { |
| 40 | path: '', |
| 41 | component: VnfsComponent, |
| 42 | children: [ |
| 43 | { |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 44 | path: 'login', |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 45 | component: userloginFormComponent, |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 46 | |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 47 | |
| 48 | }, { |
| 49 | path: 'list', |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 50 | component: MyvnfsComponent, |
| 51 | canActivate: [LoginGuardService], |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 52 | |
| 53 | }, |
| 54 | |
| 55 | { |
| 56 | path: 'design', |
| 57 | component: BuildDesignComponent, |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 58 | |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 59 | children: [ |
| 60 | { |
| 61 | path: 'references', |
| 62 | component: ReferenceDataHolderComponent, |
| 63 | children: [ |
| 64 | { |
| 65 | path: '', |
| 66 | component: ReferenceDataformComponent |
| 67 | } |
| 68 | ] |
| 69 | }, { |
| 70 | path: 'templates', |
| 71 | component: GoldenConfigurationHolderComponent, |
| 72 | // canActivate:[GCAuthGuardService], |
| 73 | children: [ |
| 74 | { |
| 75 | path: 'configureTemplate', |
| 76 | component: GoldenConfigurationComponent |
| 77 | }, |
| 78 | { |
| 79 | path: 'myTemplates', |
| 80 | component: GoldenConfigurationMappingComponent |
| 81 | } |
| 82 | , { |
| 83 | path: '', |
| 84 | redirectTo: 'myTemplates', |
| 85 | pathMatch: 'full' |
| 86 | } |
| 87 | ] |
| 88 | }, { |
| 89 | path: 'parameterDefinitions', |
| 90 | component: ParameterHolderComponent, |
| 91 | children: [ |
| 92 | { |
| 93 | path: 'create', |
| 94 | component: ParameterComponent |
| 95 | }, |
| 96 | { |
| 97 | path: 'update', |
| 98 | component: ParameterComponent |
| 99 | }, |
| 100 | { |
| 101 | path: 'session', |
| 102 | component: ParameterComponent |
| 103 | }, |
| 104 | { |
| 105 | path: 'key', |
| 106 | component: ParameterComponent |
| 107 | }, |
| 108 | { |
| 109 | path: 'clearparams', |
| 110 | component: ParameterComponent |
| 111 | }, |
| 112 | { |
| 113 | path: '', |
| 114 | redirectTo: 'create', |
| 115 | pathMatch: 'full' |
| 116 | } |
| 117 | |
| 118 | |
| 119 | ] |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 120 | } |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 121 | ] |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 122 | }, { |
| 123 | path: '', |
| 124 | redirectTo: 'list', |
| 125 | pathMatch: 'full' |
| 126 | |
Skip Wonnell | 2c977e2 | 2018-03-01 08:30:15 -0600 | [diff] [blame] | 127 | } |
| 128 | ] |
| 129 | } |
| 130 | ]; |
| 131 | |
| 132 | @NgModule({ |
| 133 | imports: [RouterModule.forChild(routes)], |
| 134 | exports: [RouterModule] |
| 135 | }) |
| 136 | export class VnfRoutingModule { |
Mohamed Asgar Samiulla(ma926a) | d7dffc2 | 2018-04-02 19:00:49 +0530 | [diff] [blame] | 137 | } |