]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: RGW buckets async validator performance enhancement
authorNizamudeen A <nia@redhat.com>
Sun, 25 Apr 2021 08:47:07 +0000 (14:17 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 12 May 2021 09:20:05 +0000 (14:50 +0530)
commit693013836c275173106a05df487d16570a67c68f
tree3ca7e118c54d1a91b51e14d9573628635afeba2a
parentcd01f5b573f9607b3ce916bd1c95ba953b84dc3a
mgr/dashboard: RGW buckets async validator performance enhancement

The rgw bucket creation form has the Name field which have an async
validator. The validator calls all the bucket name and check if the
entered name is unique or not. This happens on every keystroke. So if
100 or more buckets are there, then the async validation can be real
    slow and causes misvalidations in different fields.

I changed the validation logic and did some cleanups to improve the
performance of the async validation.

Fixes: https://tracker.ceph.com/issues/50514
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 005327c4e12fef8d7054894d9df021c0b3c53e19)
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts
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/shared/api/rgw-bucket.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-bucket.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.ts