Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 1 | /* |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 2 | * Copyright 2018-present Open Networking Foundation |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 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 | import { NgModule } from '@angular/core'; |
| 17 | import { Routes, RouterModule } from '@angular/router'; |
| 18 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 19 | /** |
| 20 | * The set of Routes in the application - can be chosen from nav menu or |
| 21 | * elsewhere like tabular icon for flows etc |
| 22 | */ |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 23 | const onosRoutes: Routes = [ |
| 24 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 25 | path: 'app', |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 26 | loadChildren: 'app/view/apps/apps.module#AppsModule' |
| 27 | }, |
| 28 | { |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 29 | path: 'processor', |
| 30 | loadChildren: 'app/view/processor/processor.module#ProcessorModule' |
| 31 | }, |
| 32 | { |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 33 | path: 'settings', |
| 34 | loadChildren: 'app/view/settings/settings.module#SettingsModule' |
| 35 | }, |
| 36 | { |
| 37 | path: 'partition', |
| 38 | loadChildren: 'app/view/partition/partition.module#PartitionModule' |
| 39 | }, |
| 40 | { |
Priyanka H M | fa5b77a | 2018-07-27 12:43:44 +0530 | [diff] [blame] | 41 | path: 'cluster', |
| 42 | loadChildren: 'app/view/cluster/cluster.module#ClusterModule' |
| 43 | }, |
| 44 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 45 | path: 'device', |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 46 | loadChildren: 'app/view/device/device.module#DeviceModule' |
| 47 | }, |
| 48 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 49 | path: 'link', |
| 50 | loadChildren: 'app/view/link/link.module#LinkModule' |
| 51 | }, |
| 52 | { |
| 53 | path: 'host', |
| 54 | loadChildren: 'app/view/host/host.module#HostModule' |
| 55 | }, |
| 56 | { |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 57 | path: 'intent', |
| 58 | loadChildren: 'app/view/intent/intent.module#IntentModule' |
| 59 | }, |
| 60 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 61 | path: 'tunnel', |
| 62 | loadChildren: 'app/view/tunnel/tunnel.module#TunnelModule' |
| 63 | }, |
| 64 | { |
| 65 | path: 'flow', |
| 66 | loadChildren: 'app/view/flow/flow.module#FlowModule' |
| 67 | }, |
| 68 | { |
| 69 | path: 'port', |
| 70 | loadChildren: 'app/view/port/port.module#PortModule' |
| 71 | }, |
| 72 | { |
| 73 | path: 'group', |
| 74 | loadChildren: 'app/view/group/group.module#GroupModule' |
| 75 | }, |
| 76 | { |
| 77 | path: 'meter', |
| 78 | loadChildren: 'app/view/meter/meter.module#MeterModule' |
| 79 | }, |
| 80 | { |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 81 | path: '', |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 82 | redirectTo: 'device', // Default to devices view - change to topo in future |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 83 | pathMatch: 'full' |
| 84 | } |
| 85 | ]; |
| 86 | |
| 87 | /** |
| 88 | * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded |
| 89 | * |
| 90 | * See https://angular.io/guide/lazy-loading-ngmodules |
| 91 | * for the theory of operation |
| 92 | */ |
| 93 | @NgModule({ |
| 94 | imports: [ |
| 95 | RouterModule.forRoot(onosRoutes) |
| 96 | ], |
| 97 | exports: [RouterModule], |
| 98 | providers: [] |
| 99 | }) |
| 100 | export class OnosRoutingModule { } |