Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 1 | /* |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 2 | * Copyright 2018-present Open Networking Foundation |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 3 | * |
| 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 Condon | 50e61a6 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 16 | import {NgModule} from '@angular/core'; |
| 17 | import {Routes, RouterModule} from '@angular/router'; |
| 18 | import {Gui2TopoLibModule} from 'gui2-topo-lib'; |
| 19 | import {FmGui2LibModule} from 'fm-gui2-lib'; |
| 20 | import {RoadmGuiLibModule} from 'roadm-gui-lib'; |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 21 | |
Sean Condon | 28ecc5f | 2018-06-25 12:50:16 +0100 | [diff] [blame] | 22 | /** |
| 23 | * The set of Routes in the application - can be chosen from nav menu or |
| 24 | * elsewhere like tabular icon for flows etc |
| 25 | */ |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 26 | const onosRoutes: Routes = [ |
| 27 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 28 | path: 'app', |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 29 | loadChildren: 'app/view/apps/apps.module#AppsModule' |
| 30 | }, |
| 31 | { |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 32 | path: 'processor', |
| 33 | loadChildren: 'app/view/processor/processor.module#ProcessorModule' |
| 34 | }, |
| 35 | { |
Bhavesh Kumar | d0b8bae | 2018-07-31 16:56:43 +0530 | [diff] [blame] | 36 | path: 'settings', |
| 37 | loadChildren: 'app/view/settings/settings.module#SettingsModule' |
| 38 | }, |
| 39 | { |
| 40 | path: 'partition', |
| 41 | loadChildren: 'app/view/partition/partition.module#PartitionModule' |
| 42 | }, |
| 43 | { |
Priyanka H M | fa5b77a | 2018-07-27 12:43:44 +0530 | [diff] [blame] | 44 | path: 'cluster', |
| 45 | loadChildren: 'app/view/cluster/cluster.module#ClusterModule' |
| 46 | }, |
| 47 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 48 | path: 'device', |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 49 | loadChildren: 'app/view/device/device.module#DeviceModule' |
| 50 | }, |
| 51 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 52 | path: 'link', |
| 53 | loadChildren: 'app/view/link/link.module#LinkModule' |
| 54 | }, |
| 55 | { |
| 56 | path: 'host', |
| 57 | loadChildren: 'app/view/host/host.module#HostModule' |
| 58 | }, |
| 59 | { |
prai | 9d44596 | 2018-07-27 13:27:43 +0530 | [diff] [blame] | 60 | path: 'intent', |
| 61 | loadChildren: 'app/view/intent/intent.module#IntentModule' |
| 62 | }, |
| 63 | { |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 64 | path: 'tunnel', |
| 65 | loadChildren: 'app/view/tunnel/tunnel.module#TunnelModule' |
| 66 | }, |
| 67 | { |
| 68 | path: 'flow', |
| 69 | loadChildren: 'app/view/flow/flow.module#FlowModule' |
| 70 | }, |
| 71 | { |
| 72 | path: 'port', |
| 73 | loadChildren: 'app/view/port/port.module#PortModule' |
| 74 | }, |
| 75 | { |
| 76 | path: 'group', |
| 77 | loadChildren: 'app/view/group/group.module#GroupModule' |
| 78 | }, |
| 79 | { |
| 80 | path: 'meter', |
| 81 | loadChildren: 'app/view/meter/meter.module#MeterModule' |
| 82 | }, |
Sean Condon | 50e61a6 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 83 | { |
| 84 | path: 'pipeconf', |
| 85 | loadChildren: 'app/view/pipeconf/pipeconf.module#PipeconfModule' |
| 86 | }, |
Sean Condon | ff85fbe | 2019-03-16 14:28:46 +0000 | [diff] [blame] | 87 | /* Comment out below section for running locally with 'ng serve' when developing */ |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 88 | { |
Sean Condon | aa4366d | 2018-11-02 14:29:01 +0000 | [diff] [blame] | 89 | path: 'topo2', |
Sean Condon | ff85fbe | 2019-03-16 14:28:46 +0000 | [diff] [blame] | 90 | loadChildren: 'gui2-topo-lib#Gui2TopoLibModule' |
Sean Condon | f4f54a1 | 2018-10-10 23:25:46 +0100 | [diff] [blame] | 91 | }, |
Sean Condon | 87b7850 | 2018-09-17 20:53:24 +0100 | [diff] [blame] | 92 | { |
| 93 | path: 'alarmTable', |
| 94 | loadChildren: 'fm-gui2-lib#FmGui2LibModule' |
| 95 | }, |
Bhavesh | 72ead49 | 2018-07-19 16:29:18 +0530 | [diff] [blame] | 96 | { |
Boyuan Yan | 6b23b38 | 2019-06-04 11:59:35 -0700 | [diff] [blame] | 97 | path: 'roadm-gui', |
| 98 | loadChildren: 'roadm-gui-lib#RoadmGuiLibModule' |
| 99 | }, |
| 100 | { |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 101 | path: '', |
Sean Condon | 0c577f6 | 2018-11-18 22:40:05 +0000 | [diff] [blame] | 102 | redirectTo: 'topo2', // Default to Topology view |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 103 | pathMatch: 'full' |
| 104 | } |
| 105 | ]; |
| 106 | |
| 107 | /** |
| 108 | * ONOS GUI -- Main Routing Module - allows modules to be lazy loaded |
| 109 | * |
| 110 | * See https://angular.io/guide/lazy-loading-ngmodules |
| 111 | * for the theory of operation |
| 112 | */ |
| 113 | @NgModule({ |
| 114 | imports: [ |
Sean Condon | 50e61a6 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 115 | RouterModule.forRoot(onosRoutes, {useHash: true}) |
Sean Condon | a00bf38 | 2018-06-23 07:54:01 +0100 | [diff] [blame] | 116 | ], |
| 117 | exports: [RouterModule], |
| 118 | providers: [] |
| 119 | }) |
Sean Condon | 50e61a6 | 2019-12-19 14:28:06 +0000 | [diff] [blame] | 120 | export class OnosRoutingModule { |
| 121 | } |