]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: fix error when typing existing paths in the Ganesha form 37688/head
authorKiefer Chang <kiefer.chang@suse.com>
Wed, 9 Sep 2020 08:20:32 +0000 (16:20 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Fri, 16 Oct 2020 06:44:11 +0000 (14:44 +0800)
commite5e9999965fd6a448889613c9bdecf3d1c07ce4c
treec0b4e1fe5e66a0774547ce621e391de1d30f29c2
parent2f33da11da69822d9bab6e9cadb58a7cc3d5720f
mgr/dashboard: fix error when typing existing paths in the Ganesha form

- The `CephFS.ls_dir()` implementation in the backend had changed, the code in the
  UI endpoint `/ui-api/nfs-ganesha/lsdir` needs to adapt.
- Add fs_name as resource_id in `/ui-api/nfs-ganesha/lsdir/<fs_name>` to distinguish FS.
- Add more checks and unit tests.

Fixes: https://tracker.ceph.com/issues/47372
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
(cherry picked from commit ee14ef7c6095d0572e90b29580f2d8d6982dcbda)

Conflicts:
src/pybind/mgr/dashboard/controllers/nfsganesha.py
src/pybind/mgr/dashboard/tests/test_ganesha.py
        - Conflict due to import order changed in the master
qa/tasks/mgr/dashboard/test_ganesha.py
src/pybind/mgr/dashboard/controllers/nfsganesha.py
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.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/api/nfs.service.ts
src/pybind/mgr/dashboard/tests/test_ganesha.py