diff options
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts')
-rw-r--r-- | src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts new file mode 100644 index 000000000..e327be59a --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts @@ -0,0 +1,32 @@ +import { ValidatorFn } from '@angular/forms'; + +export class CdFormModalFieldConfig { + // --- Generic field properties --- + name: string; + // 'binary' will use cdDimlessBinary directive on input element + // 'select' will use select element + type: 'number' | 'text' | 'binary' | 'select' | 'select-badges'; + label?: string; + required?: boolean; + value?: any; + errors?: { [errorName: string]: string }; + validators: ValidatorFn[]; + + // --- Specific field properties --- + typeConfig?: { + [prop: string]: any; + // 'select': + // --------- + // placeholder?: string; + // options?: Array<{ + // text: string; + // value: any; + // }>; + // + // 'select-badges': + // ---------------- + // customBadges: boolean; + // options: Array<SelectOption>; + // messages: SelectMessages; + }; +} |