]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: Make form modal more flexible
authorStephan Müller <smueller@suse.com>
Tue, 19 Nov 2019 08:28:26 +0000 (09:28 +0100)
committerStephan Müller <smueller@suse.com>
Fri, 13 Dec 2019 14:43:45 +0000 (15:43 +0100)
commit0341c785f9487c1508f61d30631bf10bd74e0642
tree3f651d531ed97d58b5bca47b316fd3919e13e37e
parent16bae1a3e30f3da87dda674ca599b703ec9d6ebe
mgr/dashboard: Make form modal more flexible

Now any input type is supported and the special binary type which will
use the cd-binary input and automatically format the binary size into
bytes when submitting.

Now any field can have custom validators and error messages.
The form will fallback on predefined error messages if not configured.
It will use the error messages provided by the binary min and max
validators. It still provides the error message for a required field.

Fixes: https://tracker.ceph.com/issues/38287
Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.html
src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/components/form-modal/form-modal.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-form-modal-field-config.ts [new file with mode: 0644]