From: Jason Dillaman Date: Mon, 10 Jul 2017 19:37:00 +0000 (-0400) Subject: mgr/dashboard: move rbd pools to a sub-menu item X-Git-Tag: v12.1.2~151^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e0f0e27fae75b4d1295d795dcc6ad1e0c434c52;p=ceph.git mgr/dashboard: move rbd pools to a sub-menu item Signed-off-by: Jason Dillaman --- diff --git a/src/pybind/mgr/dashboard/base.html b/src/pybind/mgr/dashboard/base.html index 27a74241aa4..237c0c1ea0e 100644 --- a/src/pybind/mgr/dashboard/base.html +++ b/src/pybind/mgr/dashboard/base.html @@ -278,14 +278,25 @@
  • - Block + + Block diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index 85412a32cf0..0bc2e1f7e61 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -433,7 +433,7 @@ class Module(MgrModule): rbd_pools = sorted([ { "name": name, - "url": "/rbd/{0}/".format(name) + "url": "/rbd_pool/{0}/".format(name) } for name in data ], key=lambda k: k['name']) @@ -545,7 +545,7 @@ class Module(MgrModule): def clients_data(self, fs_id): return self._clients(int(fs_id)) - def _rbd(self, pool_name): + def _rbd_pool(self, pool_name): rbd_ls = global_instance().rbd_ls.get(pool_name, None) if rbd_ls is None: rbd_ls = RbdLs(global_instance(), pool_name) @@ -566,12 +566,12 @@ class Module(MgrModule): return value @cherrypy.expose - def rbd(self, pool_name): - template = env.get_template("rbd.html") + def rbd_pool(self, pool_name): + template = env.get_template("rbd_pool.html") toplevel_data = self._toplevel_data() - images = self._rbd(pool_name) + images = self._rbd_pool(pool_name) content_data = { "images": images, "pool_name": pool_name @@ -586,8 +586,8 @@ class Module(MgrModule): @cherrypy.expose @cherrypy.tools.json_out() - def rbd_data(self, pool_name): - return self._rbd(pool_name) + def rbd_pool_data(self, pool_name): + return self._rbd_pool(pool_name) @cherrypy.expose def health(self): diff --git a/src/pybind/mgr/dashboard/rbd.html b/src/pybind/mgr/dashboard/rbd.html deleted file mode 100644 index ed4b9633d67..00000000000 --- a/src/pybind/mgr/dashboard/rbd.html +++ /dev/null @@ -1,64 +0,0 @@ -{% extends "base.html" %} - -{% block content %} - - - - -
    -

    - RBD -

    -
    - -
    -
    -
    -

    Images

    -
    -
    - - - - - - - - - - - - - - - - - - - -
    NameSizeObjectsObject sizeParent
    {image.name}{image.size | dimless_binary}{image.num_objs | dimless}{image.obj_size | dimless_binary}{image.parent}
    -
    -
    - - -
    - - -{% endblock %} diff --git a/src/pybind/mgr/dashboard/rbd_pool.html b/src/pybind/mgr/dashboard/rbd_pool.html new file mode 100644 index 00000000000..0838c6b55f1 --- /dev/null +++ b/src/pybind/mgr/dashboard/rbd_pool.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} + +{% block content %} + + + + +
    +

    + Block Pool { pool_name } +

    +
    + +
    +
    +
    +

    Images

    +
    +
    + + + + + + + + + + + + + + + + + + + +
    NameSizeObjectsObject sizeParent
    {image.name}{image.size | dimless_binary}{image.num_objs | dimless}{image.obj_size | dimless_binary}{image.parent}
    +
    +
    + + +
    + + +{% endblock %}