]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/dashboard: build frontend/dist in build
authorKefu Chai <kchai@redhat.com>
Sun, 11 Jul 2021 00:30:06 +0000 (08:30 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 22 Jul 2021 08:33:33 +0000 (16:33 +0800)
commit73e983cfe8fade7cce4a71bdccd3fe263b3c6143
tree419c58f929b014c508c4a949d19f161380669d82
parenta4d654b9c0f97003b5c9ca84b4ebf4637add129e
pybind/mgr/dashboard: build frontend/dist in build

to enable us to build out of source, we should build the frontend
artifacts out of src. in this change:

* cmake:
  - install frontend/dist from build
  - drop rules to exclude unused frontend artifacts.
  - pass `--output-path` option to ng
  - copy `frontend/package.json` to build so that the frontend
    can find it
* pybind/mgr/dashboard/module.py: fall back to build directory
  if frontend/dist is not found.
* pybind/mgr/dashboard/__init__.py: use frontend/dist when performing
  unit test.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/CMakeLists.txt
src/pybind/mgr/dashboard/CMakeLists.txt
src/pybind/mgr/dashboard/__init__.py
src/pybind/mgr/dashboard/module.py