]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts
e327be59a27a45722f8b28f85a14604273611994
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / models / cd-form-modal-field-config.ts
1 import { ValidatorFn } from '@angular/forms';
2
3 export class CdFormModalFieldConfig {
4 // --- Generic field properties ---
5 name: string;
6 // 'binary' will use cdDimlessBinary directive on input element
7 // 'select' will use select element
8 type: 'number' | 'text' | 'binary' | 'select' | 'select-badges';
9 label?: string;
10 required?: boolean;
11 value?: any;
12 errors?: { [errorName: string]: string };
13 validators: ValidatorFn[];
14
15 // --- Specific field properties ---
16 typeConfig?: {
17 [prop: string]: any;
18 // 'select':
19 // ---------
20 // placeholder?: string;
21 // options?: Array<{
22 // text: string;
23 // value: any;
24 // }>;
25 //
26 // 'select-badges':
27 // ----------------
28 // customBadges: boolean;
29 // options: Array<SelectOption>;
30 // messages: SelectMessages;
31 };
32 }