]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Add unique validator 23802/head
authorVolker Theile <vtheile@suse.com>
Wed, 29 Aug 2018 10:18:37 +0000 (12:18 +0200)
committerVolker Theile <vtheile@suse.com>
Thu, 30 Aug 2018 13:43:37 +0000 (15:43 +0200)
commit631a9c9844225ec47bb175a893da39795ec50e7b
tree324d4578fb2f8c953a725181e304355ab9ba7875
parentf59a673cae36cc5c9d494d43f2b7a019b91b6dda
mgr/dashboard: Add unique validator

Relocate an already existing async validator into a separate validator that can be reused by every other form. This validator is useful to check immediately after typing if an entered value, e.g. username, already exists.

The API request will be triggered after a delay of 500ms (can be modified). During this delay, every keystroke will reset the timer, so the REST API is not flooded with request.

Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-user.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts