blob: 040139b91500977e8a3ee0aac1ff51b9207d48f3 [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 {
Bhavesh72ead492018-07-19 16:29:18 +053029 path: 'device',
Sean Condona00bf382018-06-23 07:54:01 +010030 loadChildren: 'app/view/device/device.module#DeviceModule'
31 },
32 {
Bhavesh72ead492018-07-19 16:29:18 +053033 path: 'link',
34 loadChildren: 'app/view/link/link.module#LinkModule'
35 },
36 {
37 path: 'host',
38 loadChildren: 'app/view/host/host.module#HostModule'
39 },
40 {
41 path: 'tunnel',
42 loadChildren: 'app/view/tunnel/tunnel.module#TunnelModule'
43 },
44 {
45 path: 'flow',
46 loadChildren: 'app/view/flow/flow.module#FlowModule'
47 },
48 {
49 path: 'port',
50 loadChildren: 'app/view/port/port.module#PortModule'
51 },
52 {
53 path: 'group',
54 loadChildren: 'app/view/group/group.module#GroupModule'
55 },
56 {
57 path: 'meter',
58 loadChildren: 'app/view/meter/meter.module#MeterModule'
59 },
60 {
Sean Condona00bf382018-06-23 07:54:01 +010061 path: '',
Bhavesh72ead492018-07-19 16:29:18 +053062 redirectTo: 'device', // Default to devices view - change to topo in future
Sean Condona00bf382018-06-23 07:54:01 +010063 pathMatch: 'full'
64 }
65];
66
67/**
68 * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded
69 *
70 * See https://angular.io/guide/lazy-loading-ngmodules
71 * for the theory of operation
72 */
73@NgModule({
74 imports: [
75 RouterModule.forRoot(onosRoutes)
76 ],
77 exports: [RouterModule],
78 providers: []
79})
80export class OnosRoutingModule { }