]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / models / cd-form-modal-field-config.ts
index 7b2fe3f941273df3481435fe8d09ff7d2e155588..e327be59a27a45722f8b28f85a14604273611994 100644 (file)
@@ -1,19 +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';
+  type: 'number' | 'text' | 'binary' | 'select' | 'select-badges';
   label?: string;
   required?: boolean;
   value?: any;
   errors?: { [errorName: string]: string };
   validators: ValidatorFn[];
-  // only for type select
-  placeholder?: string;
-  options?: Array<{
-    text: string;
-    value: any;
-  }>;
+
+  // --- 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;
+  };
 }