]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Fix objects named `default` are inaccessible 20976/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Tue, 27 Mar 2018 13:08:31 +0000 (15:08 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 27 Mar 2018 13:20:42 +0000 (15:20 +0200)
commit452992b178138608301765757fbbf652cf618f48
treedec8bf2148fa0ab5b304f35cc994e73c67c431e2
parentfdde9057b2eea9c43101f60a753aea76b7fce5f5
mgr/dashboard: Fix objects named `default` are inaccessible

These two calls to `default()` are identical: `vpath` and
params` are both empty:

$ curl 'http://localhost/api/cp_path/'

and

$ curl 'http://localhost/api/cp_path/default'

But we need to dinstinguish them. To fix this, we need
to add the missing `default`

We now require that all exposed controllers have a @ApiController
decorator.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/dashboard/tests/test_tools.py
src/pybind/mgr/dashboard/tools.py