]> git.apps.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>
Mon, 29 Aug 2022 08:12:56 +0000 (13:42 +0530)
commit23c00ed480b9e8001790efeb891b9687887ab65d
treedbbcec45e0297f3fa547522aa7422ee4e95835e4
parentdc9b89d619920da9b69b72e80ffdf057f865be50
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>
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