blob: 48192b51261ae4cefca8a25eaa63ea00941f3f87 [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 {
Bhavesh72ead492018-07-19 16:29:18 +053033 path: 'device',
Sean Condona00bf382018-06-23 07:54:01 +010034 loadChildren: 'app/view/device/device.module#DeviceModule'
35 },
36 {
Bhavesh72ead492018-07-19 16:29:18 +053037 path: 'link',
38 loadChildren: 'app/view/link/link.module#LinkModule'
39 },
40 {
41 path: 'host',
42 loadChildren: 'app/view/host/host.module#HostModule'
43 },
44 {
prai9d445962018-07-27 13:27:43 +053045 path: 'intent',
46 loadChildren: 'app/view/intent/intent.module#IntentModule'
47 },
48 {
Bhavesh72ead492018-07-19 16:29:18 +053049 path: 'tunnel',
50 loadChildren: 'app/view/tunnel/tunnel.module#TunnelModule'
51 },
52 {
53 path: 'flow',
54 loadChildren: 'app/view/flow/flow.module#FlowModule'
55 },
56 {
57 path: 'port',
58 loadChildren: 'app/view/port/port.module#PortModule'
59 },
60 {
61 path: 'group',
62 loadChildren: 'app/view/group/group.module#GroupModule'
63 },
64 {
65 path: 'meter',
66 loadChildren: 'app/view/meter/meter.module#MeterModule'
67 },
68 {
Sean Condona00bf382018-06-23 07:54:01 +010069 path: '',
Bhavesh72ead492018-07-19 16:29:18 +053070 redirectTo: 'device', // Default to devices view - change to topo in future
Sean Condona00bf382018-06-23 07:54:01 +010071 pathMatch: 'full'
72 }
73];
74
75/**
76 * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded
77 *
78 * See https://angular.io/guide/lazy-loading-ngmodules
79 * for the theory of operation
80 */
81@NgModule({
82 imports: [
83 RouterModule.forRoot(onosRoutes)
84 ],
85 exports: [RouterModule],
86 providers: []
87})
88export class OnosRoutingModule { }