From 72fa86efa580939276bd7a7736ddc8c0b9f48c00 Mon Sep 17 00:00:00 2001 From: Sebastian Krah Date: Tue, 29 Jan 2019 14:38:31 +0100 Subject: [PATCH] mgr/dashboard: Cleanup cluster and audit log Applies the following changes: - Makes the timestamp bold and not the message - Colors the priority according to its level - Indents the message correct if it's longer than one line - Displays a message when the log is empty Fixes: https://tracker.ceph.com/issues/37916 Signed-off-by: Sebastian Krah --- .../app/ceph/cluster/logs/logs.component.html | 42 +++++++++---------- .../app/ceph/cluster/logs/logs.component.scss | 37 ++++++++++++++++ .../frontend/src/locale/messages.xlf | 12 +++++- 3 files changed, 69 insertions(+), 22 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html index e3ed20b5807..d14dbf0be6b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.html @@ -1,34 +1,34 @@ -
+
-
-

- {{ line.stamp }} {{ line.priority }}  - - {{ line.message }} -
-
-

-
+
+

+ {{ line.stamp }} + {{ line.priority }} + {{ line.message }} +

+
+
+

No entries found

+
-
-

- {{ line.stamp }} {{ line.priority }}  - - - {{ line.message }} - -
-
-

-
+
+

+ {{ line.stamp }} + {{ line.priority }} + {{ line.message }} +

+
+
+

No entries found

+
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss index 9d435e65d40..b084aada8cc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/logs/logs.component.scss @@ -1,4 +1,41 @@ +@import '../../../../defaults'; + p { font-family: monospace; color: black; } + +.well { + div p { + display: flex; + + &:last-child { + margin-bottom: 0; + } + } + + .timestamp { + font-weight: bold; + flex-shrink: 0; + } + + .priority { + margin-left: 0.5rem; + } + + .message { + margin-left: 1rem; + } + + .err { + color: $color-pink; + } + + .warn { + color: $color-bright-yellow; + } + + .info { + color: $color-brand-teal; + } +} diff --git a/src/pybind/mgr/dashboard/frontend/src/locale/messages.xlf b/src/pybind/mgr/dashboard/frontend/src/locale/messages.xlf index d7a8c9179d4..76711612b5d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/locale/messages.xlf +++ b/src/pybind/mgr/dashboard/frontend/src/locale/messages.xlf @@ -771,6 +771,16 @@ app/ceph/cluster/hosts/hosts.component.html 3 + + No entries found + + app/ceph/cluster/logs/logs.component.html + 14 + + + app/ceph/cluster/logs/logs.component.html + 30 + Cluster Logs @@ -781,7 +791,7 @@ Audit Logs app/ceph/cluster/logs/logs.component.html - 19 + 20 Status -- 2.39.5