From 2cd8c5c64c5814bdc68868d66c30a664f759152d Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 21 Jun 2017 20:34:27 -0400 Subject: [PATCH] mgr/dashboard: update health display This takes account of the new health format, also expands and visually cleans up the frontpage where we put the health information. Dark backgrounds make it much easier to use red/amber/green colours to grab attention. Signed-off-by: John Spray --- src/pybind/mgr/dashboard/base.html | 107 +++++- src/pybind/mgr/dashboard/clients.html | 5 +- src/pybind/mgr/dashboard/filesystem.html | 16 +- src/pybind/mgr/dashboard/health.html | 341 +++++++++++++----- src/pybind/mgr/dashboard/module.py | 41 ++- src/pybind/mgr/dashboard/static/logo-mini.png | Bin 0 -> 1811 bytes src/pybind/mgr/dashboard/types.py | 7 + 7 files changed, 394 insertions(+), 123 deletions(-) create mode 100644 src/pybind/mgr/dashboard/static/logo-mini.png diff --git a/src/pybind/mgr/dashboard/base.html b/src/pybind/mgr/dashboard/base.html index 18874fb565f06..efe09260e30d0 100644 --- a/src/pybind/mgr/dashboard/base.html +++ b/src/pybind/mgr/dashboard/base.html @@ -111,8 +111,11 @@ return format_number(n, 1024, ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB']); }; - - + /* This is useful if you need to display some alternative text + * when a collection is empty using rv-hide */ + rivets.formatters.length = function(val) { + return val.length; + } rivets.bind($("#health"), toplevel_data); rivets.bind($("section.sidebar"), toplevel_data); @@ -122,22 +125,102 @@ + + + - +
- +
@@ -165,17 +248,19 @@
-