]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { CommonModule } from '@angular/common'; |
2 | import { NgModule } from '@angular/core'; | |
3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | |
4 | import { RouterModule, Routes } from '@angular/router'; | |
5 | ||
f67539c2 TL |
6 | import { NgbNavModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; |
7 | import { NgxPipeFunctionModule } from 'ngx-pipe-function'; | |
11fdf7f2 | 8 | |
f67539c2 | 9 | import { ActionLabels, URLVerbs } from '~/app/shared/constants/app.constants'; |
1e59de90 | 10 | import { CRUDTableComponent } from '~/app/shared/datatable/crud-table/crud-table.component'; |
f67539c2 | 11 | import { SharedModule } from '~/app/shared/shared.module'; |
11fdf7f2 | 12 | import { PerformanceCounterModule } from '../performance-counter/performance-counter.module'; |
11fdf7f2 TL |
13 | import { RgwBucketDetailsComponent } from './rgw-bucket-details/rgw-bucket-details.component'; |
14 | import { RgwBucketFormComponent } from './rgw-bucket-form/rgw-bucket-form.component'; | |
15 | import { RgwBucketListComponent } from './rgw-bucket-list/rgw-bucket-list.component'; | |
39ae355f | 16 | import { RgwConfigModalComponent } from './rgw-config-modal/rgw-config-modal.component'; |
11fdf7f2 TL |
17 | import { RgwDaemonDetailsComponent } from './rgw-daemon-details/rgw-daemon-details.component'; |
18 | import { RgwDaemonListComponent } from './rgw-daemon-list/rgw-daemon-list.component'; | |
19 | import { RgwUserCapabilityModalComponent } from './rgw-user-capability-modal/rgw-user-capability-modal.component'; | |
20 | import { RgwUserDetailsComponent } from './rgw-user-details/rgw-user-details.component'; | |
21 | import { RgwUserFormComponent } from './rgw-user-form/rgw-user-form.component'; | |
22 | import { RgwUserListComponent } from './rgw-user-list/rgw-user-list.component'; | |
23 | import { RgwUserS3KeyModalComponent } from './rgw-user-s3-key-modal/rgw-user-s3-key-modal.component'; | |
24 | import { RgwUserSubuserModalComponent } from './rgw-user-subuser-modal/rgw-user-subuser-modal.component'; | |
25 | import { RgwUserSwiftKeyModalComponent } from './rgw-user-swift-key-modal/rgw-user-swift-key-modal.component'; | |
1e59de90 TL |
26 | import { RgwUserTabsComponent } from './rgw-user-tabs/rgw-user-tabs.component'; |
27 | import { CrudFormComponent } from '~/app/shared/forms/crud-form/crud-form.component'; | |
11fdf7f2 TL |
28 | |
29 | @NgModule({ | |
11fdf7f2 TL |
30 | imports: [ |
31 | CommonModule, | |
32 | SharedModule, | |
33 | FormsModule, | |
34 | ReactiveFormsModule, | |
35 | PerformanceCounterModule, | |
f67539c2 | 36 | NgbNavModule, |
9f95a23c | 37 | RouterModule, |
f67539c2 TL |
38 | NgbTooltipModule, |
39 | NgxPipeFunctionModule | |
11fdf7f2 TL |
40 | ], |
41 | exports: [ | |
11fdf7f2 TL |
42 | RgwDaemonListComponent, |
43 | RgwDaemonDetailsComponent, | |
44 | RgwBucketFormComponent, | |
45 | RgwBucketListComponent, | |
46 | RgwBucketDetailsComponent, | |
47 | RgwUserListComponent, | |
48 | RgwUserDetailsComponent | |
49 | ], | |
50 | declarations: [ | |
11fdf7f2 TL |
51 | RgwDaemonListComponent, |
52 | RgwDaemonDetailsComponent, | |
53 | RgwBucketFormComponent, | |
54 | RgwBucketListComponent, | |
55 | RgwBucketDetailsComponent, | |
56 | RgwUserListComponent, | |
57 | RgwUserDetailsComponent, | |
58 | RgwBucketFormComponent, | |
59 | RgwUserFormComponent, | |
60 | RgwUserSwiftKeyModalComponent, | |
61 | RgwUserS3KeyModalComponent, | |
62 | RgwUserCapabilityModalComponent, | |
39ae355f | 63 | RgwUserSubuserModalComponent, |
1e59de90 TL |
64 | RgwConfigModalComponent, |
65 | RgwUserTabsComponent | |
11fdf7f2 TL |
66 | ] |
67 | }) | |
68 | export class RgwModule {} | |
69 | ||
70 | const routes: Routes = [ | |
71 | { | |
f67539c2 | 72 | path: '' // Required for a clean reload on daemon selection. |
11fdf7f2 | 73 | }, |
1e59de90 | 74 | { path: 'daemon', component: RgwDaemonListComponent, data: { breadcrumbs: 'Gateways' } }, |
11fdf7f2 TL |
75 | { |
76 | path: 'user', | |
77 | data: { breadcrumbs: 'Users' }, | |
78 | children: [ | |
79 | { path: '', component: RgwUserListComponent }, | |
80 | { | |
81 | path: URLVerbs.CREATE, | |
82 | component: RgwUserFormComponent, | |
83 | data: { breadcrumbs: ActionLabels.CREATE } | |
84 | }, | |
85 | { | |
86 | path: `${URLVerbs.EDIT}/:uid`, | |
87 | component: RgwUserFormComponent, | |
88 | data: { breadcrumbs: ActionLabels.EDIT } | |
89 | } | |
90 | ] | |
91 | }, | |
1e59de90 TL |
92 | { |
93 | path: 'roles', | |
94 | data: { | |
95 | breadcrumbs: 'Roles', | |
96 | resource: 'api.rgw.roles@1.0', | |
97 | tabs: [ | |
98 | { | |
99 | name: 'Users', | |
100 | url: '/rgw/user' | |
101 | }, | |
102 | { | |
103 | name: 'Roles', | |
104 | url: '/rgw/roles' | |
105 | } | |
106 | ] | |
107 | }, | |
108 | children: [ | |
109 | { | |
110 | path: '', | |
111 | component: CRUDTableComponent | |
112 | }, | |
113 | { | |
114 | path: URLVerbs.CREATE, | |
115 | component: CrudFormComponent, | |
116 | data: { | |
117 | breadcrumbs: ActionLabels.CREATE | |
118 | } | |
119 | } | |
120 | ] | |
121 | }, | |
11fdf7f2 TL |
122 | { |
123 | path: 'bucket', | |
124 | data: { breadcrumbs: 'Buckets' }, | |
125 | children: [ | |
126 | { path: '', component: RgwBucketListComponent }, | |
127 | { | |
128 | path: URLVerbs.CREATE, | |
129 | component: RgwBucketFormComponent, | |
130 | data: { breadcrumbs: ActionLabels.CREATE } | |
131 | }, | |
132 | { | |
133 | path: `${URLVerbs.EDIT}/:bid`, | |
134 | component: RgwBucketFormComponent, | |
135 | data: { breadcrumbs: ActionLabels.EDIT } | |
136 | } | |
137 | ] | |
11fdf7f2 TL |
138 | } |
139 | ]; | |
140 | ||
141 | @NgModule({ | |
142 | imports: [RgwModule, RouterModule.forChild(routes)] | |
143 | }) | |
144 | export class RoutedRgwModule {} |