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 | */ |
Sean Condon | afe47c2 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 16 | import {NgModule} from '@angular/core'; |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 17 | import {Route, RouterModule} from '@angular/router'; |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 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 | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 23 | const onosRoutes: Route[] = [ |
| 24 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 25 | path: 'app', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 26 | pathMatch: 'full', |
| 27 | loadChildren: () => import('./view/apps/apps.module').then(m => m.AppsModule) |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 28 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 29 | <Route>{ |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 30 | path: 'processor', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 31 | pathMatch: 'full', |
| 32 | loadChildren: () => import('./view/processor/processor.module').then(m => m.ProcessorModule) |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 33 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 34 | <Route>{ |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 35 | path: 'settings', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 36 | pathMatch: 'full', |
| 37 | loadChildren: () => import('./view/settings/settings.module').then(m => m.SettingsModule) |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 38 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 39 | <Route>{ |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 40 | path: 'partition', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 41 | pathMatch: 'full', |
| 42 | loadChildren: () => import('./view/partition/partition.module').then(m => m.PartitionModule) |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 43 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 44 | <Route>{ |
Priyanka H M | fa5b77a | 2018-07-27 12:43:44 +0530 | [diff] [blame] | 45 | path: 'cluster', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 46 | pathMatch: 'full', |
| 47 | loadChildren: () => import('./view/cluster/cluster.module').then(m => m.ClusterModule) |
Priyanka H M | fa5b77a | 2018-07-27 12:43:44 +0530 | [diff] [blame] | 48 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 49 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 50 | path: 'device', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 51 | pathMatch: 'full', |
| 52 | loadChildren: () => import('./view/device/device.module').then(m => m.DeviceModule) |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 53 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 54 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 55 | path: 'link', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 56 | pathMatch: 'full', |
| 57 | loadChildren: () => import('./view/link/link.module').then(m => m.LinkModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 58 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 59 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 60 | path: 'host', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 61 | pathMatch: 'full', |
| 62 | loadChildren: () => import('./view/host/host.module').then(m => m.HostModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 63 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 64 | <Route>{ |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 65 | path: 'intent', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 66 | pathMatch: 'full', |
| 67 | loadChildren: () => import('./view/intent/intent.module').then(m => m.IntentModule) |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 68 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 69 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 70 | path: 'tunnel', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 71 | pathMatch: 'full', |
| 72 | loadChildren: () => import('./view/tunnel/tunnel.module').then(m => m.TunnelModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 73 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 74 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 75 | path: 'flow', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 76 | pathMatch: 'full', |
| 77 | loadChildren: () => import('./view/flow/flow.module').then(m => m.FlowModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 78 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 79 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 80 | path: 'port', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 81 | pathMatch: 'full', |
| 82 | loadChildren: () => import('./view/port/port.module').then(m => m.PortModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 83 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 84 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 85 | path: 'group', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 86 | pathMatch: 'full', |
| 87 | loadChildren: () => import('./view/group/group.module').then(m => m.GroupModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 88 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 89 | <Route>{ |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 90 | path: 'meter', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 91 | pathMatch: 'full', |
| 92 | loadChildren: () => import('./view/meter/meter.module').then(m => m.MeterModule) |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 93 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 94 | <Route>{ |
Sean Condon | afe47c2 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 95 | path: 'pipeconf', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 96 | pathMatch: 'full', |
| 97 | loadChildren: () => import('./view/pipeconf/pipeconf.module').then(m => m.PipeconfModule) |
Sean Condon | afe47c2 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 98 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 99 | <Route>{ |
Sean Condon | aa4366d | 2018-11-02 14:29:01 +0000 | [diff] [blame] | 100 | path: 'topo2', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 101 | pathMatch: 'full', |
| 102 | loadChildren: () => import('../../../../../gui2-topo-lib/lib/gui2-topo-lib.module').then(m => m.Gui2TopoLibModule) |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 103 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 104 | <Route>{ |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 105 | path: 'alarmTable', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 106 | pathMatch: 'full', |
| 107 | loadChildren: () => import('../../../../../../apps/faultmanagement/fm-gui2-lib/lib/fm-gui2-lib.module').then(m => m.FmGui2LibModule) |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 108 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 109 | <Route>{ |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 110 | path: 'roadm-gui', |
Yi Tseng | bb93b6e | 2020-02-12 14:46:07 -0800 | [diff] [blame] | 111 | pathMatch: 'prefix', |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 112 | loadChildren: () => import('../../../../../../apps/roadm/web/roadm-gui/lib/roadm-gui-lib.module').then(m => m.RoadmGuiLibModule) |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 113 | }, |
Sean Condon | 98b6ddb | 2019-12-24 08:07:40 +0000 | [diff] [blame] | 114 | <Route>{ |
Sean Condon | d6f95bf | 2020-01-21 10:10:23 +0000 | [diff] [blame] | 115 | path: 'yangModel', |
| 116 | pathMatch: 'full', |
| 117 | loadChildren: () => import('../../../../../../apps/yang-gui/yang-gui2-lib/lib/yang-gui2-lib.module').then(m => m.YangGui2LibModule) |
| 118 | }, |
| 119 | <Route>{ |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 120 | path: 'intApp', |
| 121 | pathMatch: 'prefix', |
| 122 | loadChildren: () => import('../../../../../../apps/inbandtelemetry/intApp-gui2/intApp/lib/intapp-gui2-lib.module').then(m => m.intAppGui2LibModule) |
| 123 | }, |
| 124 | <Route>{ |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 125 | path: '', |
Sean Condon | 0c577f6 | 2018-11-18 22:40:05 +0000 | [diff] [blame] | 126 | redirectTo: 'topo2', // Default to Topology view |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 127 | pathMatch: 'full' |
Davide Scano | 555617a | 2020-06-03 21:47:13 +0200 | [diff] [blame] | 128 | }, |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 129 | ]; |
| 130 | |
| 131 | /** |
| 132 | * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded |
| 133 | * |
| 134 | * See https://angular.io/guide/lazy-loading-ngmodules |
| 135 | * for the theory of operation |
| 136 | */ |
| 137 | @NgModule({ |
| 138 | imports: [ |
Sean Condon | afe47c2 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 139 | RouterModule.forRoot(onosRoutes, {useHash: true}) |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 140 | ], |
| 141 | exports: [RouterModule], |
| 142 | providers: [] |
| 143 | }) |
Sean Condon | afe47c2 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 144 | export class OnosRoutingModule { |
| 145 | } |