blob: 69433fa02193238e8fd53fadd963514536448a1b [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 Condon50e61a62019-12-19 14:28:06 +000016import {NgModule} from '@angular/core';
17import {Routes, RouterModule} from '@angular/router';
18import {Gui2TopoLibModule} from 'gui2-topo-lib';
19import {FmGui2LibModule} from 'fm-gui2-lib';
Davide Scanob5ade982020-06-03 21:47:13 +020020import {intAppGui2LibModule} from 'int-gui2-lib';
Sean Condon50e61a62019-12-19 14:28:06 +000021import {RoadmGuiLibModule} from 'roadm-gui-lib';
Sean Condona00bf382018-06-23 07:54:01 +010022
Sean Condon28ecc5f2018-06-25 12:50:16 +010023/**
24 * The set of Routes in the application - can be chosen from nav menu or
25 * elsewhere like tabular icon for flows etc
26 */
Sean Condona00bf382018-06-23 07:54:01 +010027const onosRoutes: Routes = [
28 {
Bhavesh72ead492018-07-19 16:29:18 +053029 path: 'app',
Sean Condona00bf382018-06-23 07:54:01 +010030 loadChildren: 'app/view/apps/apps.module#AppsModule'
31 },
32 {
prai9d445962018-07-27 13:27:43 +053033 path: 'processor',
34 loadChildren: 'app/view/processor/processor.module#ProcessorModule'
35 },
36 {
Bhavesh Kumard0b8bae2018-07-31 16:56:43 +053037 path: 'settings',
38 loadChildren: 'app/view/settings/settings.module#SettingsModule'
39 },
40 {
41 path: 'partition',
42 loadChildren: 'app/view/partition/partition.module#PartitionModule'
43 },
44 {
Priyanka H Mfa5b77a2018-07-27 12:43:44 +053045 path: 'cluster',
46 loadChildren: 'app/view/cluster/cluster.module#ClusterModule'
47 },
48 {
Bhavesh72ead492018-07-19 16:29:18 +053049 path: 'device',
Sean Condona00bf382018-06-23 07:54:01 +010050 loadChildren: 'app/view/device/device.module#DeviceModule'
51 },
52 {
Bhavesh72ead492018-07-19 16:29:18 +053053 path: 'link',
54 loadChildren: 'app/view/link/link.module#LinkModule'
55 },
56 {
57 path: 'host',
58 loadChildren: 'app/view/host/host.module#HostModule'
59 },
60 {
prai9d445962018-07-27 13:27:43 +053061 path: 'intent',
62 loadChildren: 'app/view/intent/intent.module#IntentModule'
63 },
64 {
Bhavesh72ead492018-07-19 16:29:18 +053065 path: 'tunnel',
66 loadChildren: 'app/view/tunnel/tunnel.module#TunnelModule'
67 },
68 {
69 path: 'flow',
70 loadChildren: 'app/view/flow/flow.module#FlowModule'
71 },
72 {
73 path: 'port',
74 loadChildren: 'app/view/port/port.module#PortModule'
75 },
76 {
77 path: 'group',
78 loadChildren: 'app/view/group/group.module#GroupModule'
79 },
80 {
81 path: 'meter',
82 loadChildren: 'app/view/meter/meter.module#MeterModule'
83 },
Sean Condon50e61a62019-12-19 14:28:06 +000084 {
85 path: 'pipeconf',
86 loadChildren: 'app/view/pipeconf/pipeconf.module#PipeconfModule'
87 },
Sean Condonff85fbe2019-03-16 14:28:46 +000088 /* Comment out below section for running locally with 'ng serve' when developing */
Sean Condonf4f54a12018-10-10 23:25:46 +010089 {
Sean Condonaa4366d2018-11-02 14:29:01 +000090 path: 'topo2',
Sean Condonff85fbe2019-03-16 14:28:46 +000091 loadChildren: 'gui2-topo-lib#Gui2TopoLibModule'
Sean Condonf4f54a12018-10-10 23:25:46 +010092 },
Sean Condon87b78502018-09-17 20:53:24 +010093 {
94 path: 'alarmTable',
95 loadChildren: 'fm-gui2-lib#FmGui2LibModule'
96 },
Bhavesh72ead492018-07-19 16:29:18 +053097 {
Boyuan Yan6b23b382019-06-04 11:59:35 -070098 path: 'roadm-gui',
99 loadChildren: 'roadm-gui-lib#RoadmGuiLibModule'
100 },
101 {
Davide Scanob5ade982020-06-03 21:47:13 +0200102 path: 'intApp',
103 loadChildren: 'int-gui2-lib#intAppGui2LibModule'
104 },
105 {
Sean Condona00bf382018-06-23 07:54:01 +0100106 path: '',
Sean Condon0c577f62018-11-18 22:40:05 +0000107 redirectTo: 'topo2', // Default to Topology view
Sean Condona00bf382018-06-23 07:54:01 +0100108 pathMatch: 'full'
Davide Scanob5ade982020-06-03 21:47:13 +0200109 },
Sean Condona00bf382018-06-23 07:54:01 +0100110];
111
112/**
113 * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded
114 *
115 * See https://angular.io/guide/lazy-loading-ngmodules
116 * for the theory of operation
117 */
118@NgModule({
119 imports: [
Sean Condon50e61a62019-12-19 14:28:06 +0000120 RouterModule.forRoot(onosRoutes, {useHash: true})
Sean Condona00bf382018-06-23 07:54:01 +0100121 ],
122 exports: [RouterModule],
123 providers: []
124})
Sean Condon50e61a62019-12-19 14:28:06 +0000125export class OnosRoutingModule {
126}