blob: 1ee9037521af137503eef41043874550199aa155 [file] [log] [blame]
Sean Condona00bf382018-06-23 07:54:01 +01001/*
Sean Condon28ecc5f2018-06-25 12:50:16 +01002 * Copyright 2018-present Open Networking Foundation
Sean Condona00bf382018-06-23 07:54:01 +01003 *
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 Condonafe47c22019-12-19 14:28:06 +000016import {NgModule} from '@angular/core';
Sean Condon98b6ddb2019-12-24 08:07:40 +000017import {Route, RouterModule} from '@angular/router';
Sean Condona00bf382018-06-23 07:54:01 +010018
Sean Condon28ecc5f2018-06-25 12:50:16 +010019/**
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 Condon98b6ddb2019-12-24 08:07:40 +000023const onosRoutes: Route[] = [
24 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053025 path: 'app',
Sean Condon98b6ddb2019-12-24 08:07:40 +000026 pathMatch: 'full',
27 loadChildren: () => import('./view/apps/apps.module').then(m => m.AppsModule)
Sean Condona00bf382018-06-23 07:54:01 +010028 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000029 <Route>{
prai9d445962018-07-27 13:27:43 +053030 path: 'processor',
Sean Condon98b6ddb2019-12-24 08:07:40 +000031 pathMatch: 'full',
32 loadChildren: () => import('./view/processor/processor.module').then(m => m.ProcessorModule)
prai9d445962018-07-27 13:27:43 +053033 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000034 <Route>{
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053035 path: 'settings',
Sean Condon98b6ddb2019-12-24 08:07:40 +000036 pathMatch: 'full',
37 loadChildren: () => import('./view/settings/settings.module').then(m => m.SettingsModule)
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053038 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000039 <Route>{
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053040 path: 'partition',
Sean Condon98b6ddb2019-12-24 08:07:40 +000041 pathMatch: 'full',
42 loadChildren: () => import('./view/partition/partition.module').then(m => m.PartitionModule)
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053043 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000044 <Route>{
Priyanka H Mfa5b77a2018-07-27 12:43:44 +053045 path: 'cluster',
Sean Condon98b6ddb2019-12-24 08:07:40 +000046 pathMatch: 'full',
47 loadChildren: () => import('./view/cluster/cluster.module').then(m => m.ClusterModule)
Priyanka H Mfa5b77a2018-07-27 12:43:44 +053048 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000049 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053050 path: 'device',
Sean Condon98b6ddb2019-12-24 08:07:40 +000051 pathMatch: 'full',
52 loadChildren: () => import('./view/device/device.module').then(m => m.DeviceModule)
Sean Condona00bf382018-06-23 07:54:01 +010053 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000054 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053055 path: 'link',
Sean Condon98b6ddb2019-12-24 08:07:40 +000056 pathMatch: 'full',
57 loadChildren: () => import('./view/link/link.module').then(m => m.LinkModule)
Bhavesh72ead492018-07-19 16:29:18 +053058 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000059 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053060 path: 'host',
Sean Condon98b6ddb2019-12-24 08:07:40 +000061 pathMatch: 'full',
62 loadChildren: () => import('./view/host/host.module').then(m => m.HostModule)
Bhavesh72ead492018-07-19 16:29:18 +053063 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000064 <Route>{
prai9d445962018-07-27 13:27:43 +053065 path: 'intent',
Sean Condon98b6ddb2019-12-24 08:07:40 +000066 pathMatch: 'full',
67 loadChildren: () => import('./view/intent/intent.module').then(m => m.IntentModule)
prai9d445962018-07-27 13:27:43 +053068 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000069 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053070 path: 'tunnel',
Sean Condon98b6ddb2019-12-24 08:07:40 +000071 pathMatch: 'full',
72 loadChildren: () => import('./view/tunnel/tunnel.module').then(m => m.TunnelModule)
Bhavesh72ead492018-07-19 16:29:18 +053073 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000074 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053075 path: 'flow',
Sean Condon98b6ddb2019-12-24 08:07:40 +000076 pathMatch: 'full',
77 loadChildren: () => import('./view/flow/flow.module').then(m => m.FlowModule)
Bhavesh72ead492018-07-19 16:29:18 +053078 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000079 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053080 path: 'port',
Sean Condon98b6ddb2019-12-24 08:07:40 +000081 pathMatch: 'full',
82 loadChildren: () => import('./view/port/port.module').then(m => m.PortModule)
Bhavesh72ead492018-07-19 16:29:18 +053083 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000084 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053085 path: 'group',
Sean Condon98b6ddb2019-12-24 08:07:40 +000086 pathMatch: 'full',
87 loadChildren: () => import('./view/group/group.module').then(m => m.GroupModule)
Bhavesh72ead492018-07-19 16:29:18 +053088 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000089 <Route>{
Bhavesh72ead492018-07-19 16:29:18 +053090 path: 'meter',
Sean Condon98b6ddb2019-12-24 08:07:40 +000091 pathMatch: 'full',
92 loadChildren: () => import('./view/meter/meter.module').then(m => m.MeterModule)
Bhavesh72ead492018-07-19 16:29:18 +053093 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000094 <Route>{
Sean Condonafe47c22019-12-19 14:28:06 +000095 path: 'pipeconf',
Sean Condon98b6ddb2019-12-24 08:07:40 +000096 pathMatch: 'full',
97 loadChildren: () => import('./view/pipeconf/pipeconf.module').then(m => m.PipeconfModule)
Sean Condonafe47c22019-12-19 14:28:06 +000098 },
Sean Condon98b6ddb2019-12-24 08:07:40 +000099 <Route>{
Sean Condonaa4366d2018-11-02 14:29:01 +0000100 path: 'topo2',
Sean Condon98b6ddb2019-12-24 08:07:40 +0000101 pathMatch: 'full',
102 loadChildren: () => import('../../../../../gui2-topo-lib/lib/gui2-topo-lib.module').then(m => m.Gui2TopoLibModule)
Sean Condonf4f54a12018-10-10 23:25:46 +0100103 },
Sean Condon98b6ddb2019-12-24 08:07:40 +0000104 <Route>{
Sean Condon87b78502018-09-17 20:53:24 +0100105 path: 'alarmTable',
Sean Condon98b6ddb2019-12-24 08:07:40 +0000106 pathMatch: 'full',
107 loadChildren: () => import('../../../../../../apps/faultmanagement/fm-gui2-lib/lib/fm-gui2-lib.module').then(m => m.FmGui2LibModule)
Sean Condon87b78502018-09-17 20:53:24 +0100108 },
Sean Condon98b6ddb2019-12-24 08:07:40 +0000109 <Route>{
Boyuan Yan6b23b382019-06-04 11:59:35 -0700110 path: 'roadm-gui',
Yi Tsengbb93b6e2020-02-12 14:46:07 -0800111 pathMatch: 'prefix',
Sean Condon98b6ddb2019-12-24 08:07:40 +0000112 loadChildren: () => import('../../../../../../apps/roadm/web/roadm-gui/lib/roadm-gui-lib.module').then(m => m.RoadmGuiLibModule)
Boyuan Yan6b23b382019-06-04 11:59:35 -0700113 },
Sean Condon98b6ddb2019-12-24 08:07:40 +0000114 <Route>{
Sean Condond6f95bf2020-01-21 10:10:23 +0000115 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 Scano555617a2020-06-03 21:47:13 +0200120 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 Condona00bf382018-06-23 07:54:01 +0100125 path: '',
Sean Condon0c577f62018-11-18 22:40:05 +0000126 redirectTo: 'topo2', // Default to Topology view
Sean Condona00bf382018-06-23 07:54:01 +0100127 pathMatch: 'full'
Davide Scano555617a2020-06-03 21:47:13 +0200128 },
Sean Condona00bf382018-06-23 07:54:01 +0100129];
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 Condonafe47c22019-12-19 14:28:06 +0000139 RouterModule.forRoot(onosRoutes, {useHash: true})
Sean Condona00bf382018-06-23 07:54:01 +0100140 ],
141 exports: [RouterModule],
142 providers: []
143})
Sean Condonafe47c22019-12-19 14:28:06 +0000144export class OnosRoutingModule {
145}