blob: 77bce5a3404752d616d97513dd7f124152e94022 [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';
Sean Condon87b78502018-09-17 20:53:24 +010018import { FmGui2LibModule } from 'fm-gui2-lib';
Sean Condona00bf382018-06-23 07:54:01 +010019
Sean Condon28ecc5f2018-06-25 12:50:16 +010020/**
21 * The set of Routes in the application - can be chosen from nav menu or
22 * elsewhere like tabular icon for flows etc
23 */
Sean Condona00bf382018-06-23 07:54:01 +010024const onosRoutes: Routes = [
25 {
Bhavesh72ead492018-07-19 16:29:18 +053026 path: 'app',
Sean Condona00bf382018-06-23 07:54:01 +010027 loadChildren: 'app/view/apps/apps.module#AppsModule'
28 },
29 {
prai9d445962018-07-27 13:27:43 +053030 path: 'processor',
31 loadChildren: 'app/view/processor/processor.module#ProcessorModule'
32 },
33 {
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053034 path: 'settings',
35 loadChildren: 'app/view/settings/settings.module#SettingsModule'
36 },
37 {
38 path: 'partition',
39 loadChildren: 'app/view/partition/partition.module#PartitionModule'
40 },
41 {
Priyanka H Mfa5b77a2018-07-27 12:43:44 +053042 path: 'cluster',
43 loadChildren: 'app/view/cluster/cluster.module#ClusterModule'
44 },
45 {
Bhavesh72ead492018-07-19 16:29:18 +053046 path: 'device',
Sean Condona00bf382018-06-23 07:54:01 +010047 loadChildren: 'app/view/device/device.module#DeviceModule'
48 },
49 {
Bhavesh72ead492018-07-19 16:29:18 +053050 path: 'link',
51 loadChildren: 'app/view/link/link.module#LinkModule'
52 },
53 {
54 path: 'host',
55 loadChildren: 'app/view/host/host.module#HostModule'
56 },
57 {
prai9d445962018-07-27 13:27:43 +053058 path: 'intent',
59 loadChildren: 'app/view/intent/intent.module#IntentModule'
60 },
61 {
Bhavesh72ead492018-07-19 16:29:18 +053062 path: 'tunnel',
63 loadChildren: 'app/view/tunnel/tunnel.module#TunnelModule'
64 },
65 {
66 path: 'flow',
67 loadChildren: 'app/view/flow/flow.module#FlowModule'
68 },
69 {
70 path: 'port',
71 loadChildren: 'app/view/port/port.module#PortModule'
72 },
73 {
74 path: 'group',
75 loadChildren: 'app/view/group/group.module#GroupModule'
76 },
77 {
78 path: 'meter',
79 loadChildren: 'app/view/meter/meter.module#MeterModule'
80 },
Sean Condonf4f54a12018-10-10 23:25:46 +010081 {
Sean Condonaa4366d2018-11-02 14:29:01 +000082 path: 'topo2',
Sean Condonf4f54a12018-10-10 23:25:46 +010083 loadChildren: 'app/view/topology/topology.module#TopologyModule'
84 },
Sean Condon87b78502018-09-17 20:53:24 +010085/* Comment out below section for running locally with 'ng serve' when developing */
86 {
87 path: 'alarmTable',
88 loadChildren: 'fm-gui2-lib#FmGui2LibModule'
89 },
Bhavesh72ead492018-07-19 16:29:18 +053090 {
Sean Condona00bf382018-06-23 07:54:01 +010091 path: '',
Sean Condon0c577f62018-11-18 22:40:05 +000092 redirectTo: 'topo2', // Default to Topology view
Sean Condona00bf382018-06-23 07:54:01 +010093 pathMatch: 'full'
94 }
95];
96
97/**
98 * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded
99 *
100 * See https://angular.io/guide/lazy-loading-ngmodules
101 * for the theory of operation
102 */
103@NgModule({
104 imports: [
Sean Condon87b78502018-09-17 20:53:24 +0100105 RouterModule.forRoot(onosRoutes, { useHash : true })
Sean Condona00bf382018-06-23 07:54:01 +0100106 ],
107 exports: [RouterModule],
108 providers: []
109})
110export class OnosRoutingModule { }