]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/datatable.module.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / datatable / datatable.module.ts
CommitLineData
11fdf7f2
TL
1import { CommonModule } from '@angular/common';
2import { NgModule } from '@angular/core';
11fdf7f2
TL
3import { RouterModule } from '@angular/router';
4
f67539c2 5import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
11fdf7f2 6import { NgxDatatableModule } from '@swimlane/ngx-datatable';
f67539c2 7import { NgxPipeFunctionModule } from 'ngx-pipe-function';
11fdf7f2 8
1e59de90
TL
9import { FormsModule, ReactiveFormsModule } from '@angular/forms';
10import { FormlyModule } from '@ngx-formly/core';
11import { FormlyBootstrapModule } from '@ngx-formly/bootstrap';
11fdf7f2
TL
12import { ComponentsModule } from '../components/components.module';
13import { PipesModule } from '../pipes/pipes.module';
1e59de90 14import { CRUDTableComponent } from './crud-table/crud-table.component';
11fdf7f2
TL
15import { TableActionsComponent } from './table-actions/table-actions.component';
16import { TableKeyValueComponent } from './table-key-value/table-key-value.component';
39ae355f 17import { TablePaginationComponent } from './table-pagination/table-pagination.component';
11fdf7f2 18import { TableComponent } from './table/table.component';
1e59de90
TL
19import { CrudFormComponent } from '../forms/crud-form/crud-form.component';
20import { FormlyArrayTypeComponent } from '../forms/crud-form/formly-array-type/formly-array-type.component';
21import { FormlyInputTypeComponent } from '../forms/crud-form/formly-input-type/formly-input-type.component';
22import { FormlyObjectTypeComponent } from '../forms/crud-form/formly-object-type/formly-object-type.component';
23import { FormlyTextareaTypeComponent } from '../forms/crud-form/formly-textarea-type/formly-textarea-type.component';
24import { FormlyInputWrapperComponent } from '../forms/crud-form/formly-input-wrapper/formly-input-wrapper.component';
25import { FormlyFileTypeComponent } from '../forms/crud-form/formly-file-type/formly-file-type.component';
26import { FormlyFileValueAccessorDirective } from '../forms/crud-form/formly-file-type/formly-file-type-accessor';
11fdf7f2
TL
27
28@NgModule({
29 imports: [
30 CommonModule,
31 NgxDatatableModule,
f67539c2 32 NgxPipeFunctionModule,
11fdf7f2 33 FormsModule,
f67539c2
TL
34 NgbDropdownModule,
35 NgbTooltipModule,
11fdf7f2
TL
36 PipesModule,
37 ComponentsModule,
1e59de90
TL
38 RouterModule,
39 ReactiveFormsModule,
40 FormlyModule.forRoot({
41 types: [
42 { name: 'array', component: FormlyArrayTypeComponent },
43 { name: 'object', component: FormlyObjectTypeComponent },
44 { name: 'input', component: FormlyInputTypeComponent, wrappers: ['input-wrapper'] },
45 { name: 'textarea', component: FormlyTextareaTypeComponent, wrappers: ['input-wrapper'] },
46 { name: 'file', component: FormlyFileTypeComponent, wrappers: ['input-wrapper'] }
47 ],
48 validationMessages: [
49 { name: 'required', message: 'This field is required' },
50 { name: 'json', message: 'This field is not a valid json document' },
51 {
52 name: 'rgwRoleName',
53 message:
54 'Role name must contain letters, numbers or the ' +
55 'following valid special characters "_+=,.@-]+" (pattern: [0-9a-zA-Z_+=,.@-]+)'
56 },
57 {
58 name: 'rgwRolePath',
59 message:
60 'Role path must start and finish with a slash "/".' +
61 ' (pattern: (\u002F)|(\u002F[\u0021-\u007E]+\u002F))'
62 },
63 { name: 'file_size', message: 'File size must not exceed 4KiB' }
64 ],
65 wrappers: [{ name: 'input-wrapper', component: FormlyInputWrapperComponent }]
66 }),
67 FormlyBootstrapModule
11fdf7f2 68 ],
39ae355f
TL
69 declarations: [
70 TableComponent,
71 TableKeyValueComponent,
72 TableActionsComponent,
1e59de90
TL
73 CRUDTableComponent,
74 TablePaginationComponent,
75 CrudFormComponent,
76 FormlyArrayTypeComponent,
77 FormlyInputTypeComponent,
78 FormlyObjectTypeComponent,
79 FormlyInputWrapperComponent,
80 FormlyFileTypeComponent,
81 FormlyFileValueAccessorDirective
39ae355f
TL
82 ],
83 exports: [
84 TableComponent,
85 NgxDatatableModule,
86 TableKeyValueComponent,
87 TableActionsComponent,
1e59de90 88 CRUDTableComponent,
39ae355f
TL
89 TablePaginationComponent
90 ]
11fdf7f2
TL
91})
92export class DataTableModule {}