blob: ac581ee0d45b7a11633d6b0ab038e03645092999 [file] [log] [blame]
Radek Krejcid23f0df2017-08-31 16:34:49 +02001import { NgModule } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { Routes, RouterModule } from '@angular/router';
4import { FormsModule } from '@angular/forms';
5import { HttpModule } from '@angular/http';
6
7import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
8
9import { AuthGuard } from 'app/utils/auth.guard';
10
11import { NetopeerComponent } from './netopeer.component';
12import { DashboardComponent } from './dashboard.component';
13import { InventoryComponent } from './inventory/inventory.component';
14import { InventorySchemasComponent } from './inventory/schemas.component';
15import { InventoryDevicesComponent } from './inventory/devices.component';
16import { ConfigComponent } from './config/config.component';
17import { YANGComponent } from './yang/yang.component';
18import { MonitoringComponent } from './monitoring/monitoring.component';
19import { PluginsComponent } from './plugins/plugins.component';
20
21
22const routes: Routes = [
23 { path : 'netopeer', component : NetopeerComponent, canActivate : [AuthGuard],
24 data : { role : 10, name : 'Netopeer', description : 'Network Management Center', icon : 'fa-user-secret' },
25 children: [
26 { path : 'dashboard', component : DashboardComponent, canActivate : [AuthGuard] },
27 { path : 'inventory', component : InventoryComponent, canActivate : [AuthGuard],
28 children : [
29 { path : 'devices', component : InventoryDevicesComponent, canActivate : [AuthGuard] },
30 { path : 'schemas', component : InventorySchemasComponent, canActivate : [AuthGuard] }
31 ]
32 },
33 { path : 'config', component : ConfigComponent, canActivate : [AuthGuard] },
34 { path : 'yang', component : YANGComponent, canActivate : [AuthGuard] },
35 { path : 'monitoring', component : MonitoringComponent, canActivate : [AuthGuard] },
36 { path : 'plugins', component : PluginsComponent, canActivate : [AuthGuard] }
37 ]
38 }
39]
40
41@NgModule({
42 imports: [
43 CommonModule,
44 FormsModule,
45 HttpModule,
46 NgbModule.forRoot(),
47 RouterModule.forChild(routes)
48 ],
49 declarations: [
50 NetopeerComponent,
51 DashboardComponent,
52 InventoryComponent,
53 InventorySchemasComponent,
54 InventoryDevicesComponent,
55 ConfigComponent,
56 YANGComponent,
57 MonitoringComponent,
58 PluginsComponent
59 ],
60 entryComponents : [
61 NetopeerComponent
62 ]
63})
64export class NetopeerModule { }