]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: add feature toggle for NFS
authorErnesto Puerta <epuertat@redhat.com>
Wed, 4 Mar 2020 20:31:50 +0000 (21:31 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Wed, 11 Mar 2020 14:03:58 +0000 (15:03 +0100)
commitfcb77ee9d638f152ef889c903407a97ff43104e4
tree50309fa02301c2e95dc79110825d404b3f51a922
parentc4d5c430c9e54f57eeff67ecbb9c4d37f4ea69eb
mgr/dashboard: add feature toggle for NFS

- New NFS feature toggle added.
- Fixed regression which broke FeatureToggles in the main menu.
- Added extensive unit testing to NavigationComponent
- Added ng-mocks to improve test isolation and performance (~7x, 139s to
20s)
- Added ng-bullet package to improve unit testing performance (2x, 20s
to 9s)
- Added Rxjs Schedulers to implement NgZone.runOutsideAngular in a Rxjs
friendly way (based on
    https://stackoverflow.com/questions/43121400/run-ngrx-effect-outside-of-angulars-zone-to-prevent-timeout-in-protractor)

Minor issues found from exhaustive unit testing:
- Missing permissions in Cluster menu:
  - `permissions.log.read` and `permissions.prometheus.read`
- Missing classes:
  - Block -> Images: `tc_submenuitem_block_images`
  - Block -> iSCSI: `tc_submenuitem_block_iscsi`
- Typos:
  - class `tc_submenuitem_hosts` assigned to OSD menu (instead of
      `tc_submenuitem_osd`)
  - `tc_menuitem_cephs` -> `tc_menuitem_cephfs`

Minor changes:
- Previously, Cluster Map -> CRUSH Map required both OSD and Host
permissions. Now it only requires OSD permissions (there are no
references to hosts in CRUSH Map page). Nevertheless, all system roles
setting OSD permission also set Host's, so no impact expected.
- Previously, Cluster -> Monitoring menu was hidden when both Prometheus
or Alertmanager weren't configured. Now it's displayed and when clicked
on it shows the helper banner indicating that further configuration is
required. This change removes the dependency on the PrometheusService.

Fixes: https://tracker.ceph.com/issues/43419
Fixes: https://tracker.ceph.com/issues/43715
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
12 files changed:
doc/mgr/dashboard_plugins/feature_toggles.inc.rst
src/pybind/mgr/dashboard/controllers/nfsganesha.py
src/pybind/mgr/dashboard/frontend/package-lock.json
src/pybind/mgr/dashboard/frontend/package.json
src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/feature-toggles.service.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/ngzone-scheduler.service.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/plugins/feature_toggles.py
src/pybind/mgr/dashboard/services/ganesha.py