]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: fix nfs exports form issues with squash field
authorNizamudeen A <nia@redhat.com>
Fri, 12 Aug 2022 10:44:31 +0000 (16:14 +0530)
committerNizamudeen A <nia@redhat.com>
Sun, 4 Sep 2022 07:42:38 +0000 (13:12 +0530)
commitb1aa496b1056cb7fcb79493cf30207aeb4db1b23
tree0be4fab0dd616ca1c4b99f60eab3995e3b0e649d
parent62963995ef4f8aae60d599d6d4dde9522e670ac4
mgr/dashboard: fix nfs exports form issues with squash field

1. Squash is not a mandatory field.
2. If the export is created from backend, then squash can have many
   different names for each types of squash. for eg.
```
['root', 'root_squash', 'rootsquash', 'rootid', 'root_id_squash', 'rootidsquash', 'all', 'all_squash', 'allsquash', 'all_anomnymous', 'allanonymous', 'no_root_squash', 'none', 'noidsquash']
```
so we need a proper matching in the ui too otherwise the edit field will
not have any value for the squash field.

3. Removed unncessary dropdown helper if there are values for the squash
   and access types.

Fixes: https://tracker.ceph.com/issues/57114
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 23c00ed480b9e8001790efeb891b9687887ab65d)
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form-client/nfs-form-client.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/nfs.service.ts