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