]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { CommonModule } from '@angular/common'; |
2 | import { NgModule } from '@angular/core'; | |
3 | import { ReactiveFormsModule } from '@angular/forms'; | |
4 | import { RouterModule, Routes } from '@angular/router'; | |
5 | ||
9f95a23c | 6 | import { NgBootstrapFormValidationModule } from 'ng-bootstrap-form-validation'; |
11fdf7f2 TL |
7 | import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; |
8 | import { PopoverModule } from 'ngx-bootstrap/popover'; | |
9 | import { TabsModule } from 'ngx-bootstrap/tabs'; | |
10 | import { TooltipModule } from 'ngx-bootstrap/tooltip'; | |
11 | ||
12 | import { ActionLabels, URLVerbs } from '../../shared/constants/app.constants'; | |
11fdf7f2 TL |
13 | import { SharedModule } from '../../shared/shared.module'; |
14 | import { BlockModule } from '../block/block.module'; | |
15 | import { CephSharedModule } from '../shared/ceph-shared.module'; | |
9f95a23c TL |
16 | import { CrushRuleFormModalComponent } from './crush-rule-form-modal/crush-rule-form-modal.component'; |
17 | import { ErasureCodeProfileFormModalComponent } from './erasure-code-profile-form/erasure-code-profile-form-modal.component'; | |
11fdf7f2 TL |
18 | import { PoolDetailsComponent } from './pool-details/pool-details.component'; |
19 | import { PoolFormComponent } from './pool-form/pool-form.component'; | |
20 | import { PoolListComponent } from './pool-list/pool-list.component'; | |
21 | ||
22 | @NgModule({ | |
23 | imports: [ | |
24 | CephSharedModule, | |
25 | CommonModule, | |
26 | TabsModule, | |
27 | PopoverModule.forRoot(), | |
28 | SharedModule, | |
29 | RouterModule, | |
30 | ReactiveFormsModule, | |
31 | BsDropdownModule, | |
11fdf7f2 | 32 | TooltipModule.forRoot(), |
9f95a23c TL |
33 | BlockModule, |
34 | NgBootstrapFormValidationModule | |
11fdf7f2 TL |
35 | ], |
36 | exports: [PoolListComponent, PoolFormComponent], | |
37 | declarations: [ | |
38 | PoolListComponent, | |
39 | PoolFormComponent, | |
9f95a23c TL |
40 | ErasureCodeProfileFormModalComponent, |
41 | CrushRuleFormModalComponent, | |
11fdf7f2 TL |
42 | PoolDetailsComponent |
43 | ], | |
9f95a23c | 44 | entryComponents: [CrushRuleFormModalComponent, ErasureCodeProfileFormModalComponent] |
11fdf7f2 TL |
45 | }) |
46 | export class PoolModule {} | |
47 | ||
48 | const routes: Routes = [ | |
49 | { path: '', component: PoolListComponent }, | |
50 | { | |
51 | path: URLVerbs.CREATE, | |
52 | component: PoolFormComponent, | |
53 | data: { breadcrumbs: ActionLabels.CREATE } | |
54 | }, | |
55 | { | |
56 | path: `${URLVerbs.EDIT}/:name`, | |
57 | component: PoolFormComponent, | |
58 | data: { breadcrumbs: ActionLabels.EDIT } | |
59 | } | |
60 | ]; | |
61 | ||
62 | @NgModule({ | |
63 | imports: [PoolModule, RouterModule.forChild(routes)] | |
64 | }) | |
65 | export class RoutedPoolModule {} |