blob: 327f17e61e997729c914b1c5add88bf8837fbc4f [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 */
16import { NgModule } from '@angular/core';
17import { Routes, RouterModule } from '@angular/router';
18
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 Condona00bf382018-06-23 07:54:01 +010023const onosRoutes: Routes = [
24 {
Bhavesh72ead492018-07-19 16:29:18 +053025 path: 'app',
Sean Condona00bf382018-06-23 07:54:01 +010026 loadChildren: 'app/view/apps/apps.module#AppsModule'
27 },
28 {
prai9d445962018-07-27 13:27:43 +053029 path: 'processor',
30 loadChildren: 'app/view/processor/processor.module#ProcessorModule'
31 },
32 {
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053033 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 Mfa5b77a2018-07-27 12:43:44 +053041 path: 'cluster',
42 loadChildren: 'app/view/cluster/cluster.module#ClusterModule'
43 },
44 {
Bhavesh72ead492018-07-19 16:29:18 +053045 path: 'device',
Sean Condona00bf382018-06-23 07:54:01 +010046 loadChildren: 'app/view/device/device.module#DeviceModule'
47 },
48 {
Bhavesh72ead492018-07-19 16:29:18 +053049 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 {
prai9d445962018-07-27 13:27:43 +053057 path: 'intent',
58 loadChildren: 'app/view/intent/intent.module#IntentModule'
59 },
60 {
Bhavesh72ead492018-07-19 16:29:18 +053061 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 Condona00bf382018-06-23 07:54:01 +010081 path: '',
Bhavesh72ead492018-07-19 16:29:18 +053082 redirectTo: 'device', // Default to devices view - change to topo in future
Sean Condona00bf382018-06-23 07:54:01 +010083 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})
100export class OnosRoutingModule { }