From bc810d578c2c25faaf2aa8cd17e989031efe749c Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Wed, 16 Jan 2019 17:10:19 +0100 Subject: Add different modes and a more compact design Add widescreen side by side mode Add borderless mode Add noheader mode Make layout more compact Add autorefresh in seconds --- bwLpStatus.py | 2 +- bwlpMonitor_template.html | 62 +++++++++++++++++++++++++++++++++++++++++++++ style.css | 64 +++++++++++++++++++++++++++++++++-------------- 3 files changed, 108 insertions(+), 20 deletions(-) diff --git a/bwLpStatus.py b/bwLpStatus.py index 67e6531..d9c20c6 100755 --- a/bwLpStatus.py +++ b/bwLpStatus.py @@ -235,7 +235,7 @@ for entry in reversed(logEntries): + entry.service + ']
[' + entry.state + ']
[' - + entry.host +']
' + + entry.host +']
' + entry.msg + '
') # Copy the .html file and replace the %CONTENT% to generate the final html file. diff --git a/bwlpMonitor_template.html b/bwlpMonitor_template.html index 6a41d66..19a804b 100644 --- a/bwlpMonitor_template.html +++ b/bwlpMonitor_template.html @@ -38,3 +38,65 @@ + + \ No newline at end of file diff --git a/style.css b/style.css index 3150bc3..5d49e2a 100644 --- a/style.css +++ b/style.css @@ -11,6 +11,7 @@ body { align-items: center; justify-content: flex-start; margin: unset; + height: 100%; } a { @@ -32,7 +33,7 @@ a:hover { background-color: white; height: 60px; position: fixed; - box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important; + box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12); } #header_left { @@ -84,33 +85,33 @@ a:hover { #body { display: flex; flex-direction: column; - justify-content: center; align-items: center; - margin-top: 90px; + margin-top: 60px; min-height: 300px; + padding: 30px; } #content { display: flex; flex-direction: column; - width: 800px; - box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important; + max-width: 800px; + min-width: 500px; + width: 100%; + box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12); background-color: #f5f5f5; overflow: auto; - margin-top: 30px; min-height: 150px; flex-shrink: 1; } .content_item { display: flex; - flex-direction: row; - justify-content: center; - justify-items: stretch; - align-items: center; + align-items: stretch; min-height: 50px; - height: 80px; border-bottom: 1px solid #e2e2e2; + flex: 1; + border-left: 3px solid #8a8a8a; + margin-left: -3px; } .content_item:hover { @@ -118,17 +119,13 @@ a:hover { } .content_item_part { - height: 100%; width: 100%; display: flex; flex-direction: column; - justify-content: center; align-items: center; border-left: 1px solid #e2e2e2; border-right: 1px solid #e2e2e2; -} - -.content_item_part_title { + justify-content: center; } .content_item_part_subtitle { @@ -154,15 +151,15 @@ a:hover { background-color: #f5f5f5; white-space: nowrap; height: 100%; + --wrap: nowrap; } #log_wrapper { display: flex; min-height: 150px; - max-height: 600px; + max-height: 80vh; margin-top: 60px; - margin-bottom: 90px; - box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important; + box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12); overflow: auto; max-width: 80vw; } @@ -187,6 +184,10 @@ a:hover { margin-right: 5px; } +.log_item_part_msg { + white-space: var(--wrap); +} + .time { color: #40bac8; padding-left: 10px; @@ -199,3 +200,28 @@ a:hover { .log_item:hover { background-color: #efeeee; } + +@media (min-width: 1500px) { + #body { + flex-direction: row; + } + + #log_wrapper { + margin-left: 40px; + margin-top: 0px; + max-width: 60vw; + max-height: 80vh; + } + #content { + width: 30%; + } +} + +@media (max-width: 850px) { + #header_right { + visibility: collapse; + } + #header_left { + visibility: collapse; + } +} -- cgit v1.2.3-55-g7522