From 47d2e42f382b576ddbb953bc88629cc962bf9660 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 10 Sep 2023 09:45:33 +0200 Subject: [PATCH] remove on-hover effect, hide output of "ok" services --- statuspage/static/scripts.js | 18 +++++++----------- statuspage/static/style.css | 12 +++--------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/statuspage/static/scripts.js b/statuspage/static/scripts.js index f40bb3e..5348c93 100644 --- a/statuspage/static/scripts.js +++ b/statuspage/static/scripts.js @@ -26,24 +26,20 @@ function render_status_page() { last_hostname = item['attrs']['host_name'] } - if (item['attrs']['state'] == 0) { - out += '
'; - } else { - out += '
'; - } - out += '

'; out += downtime_or_ack_to_string(item['attrs']['downtime_depth'], item['attrs']['acknowledgement']) + ' '; out += state_to_string(item['attrs']['state'], item['attrs']['state_type']) + ' '; out += escape_html(item['attrs']['display_name']); out += '

'; - out += '
' + escape_html(item['attrs']['last_check_result']['output']) + '
'; + if (item['attrs']['state'] != 0) { + out += '
' + escape_html(item['attrs']['last_check_result']['output']) + '
'; - out += '

'; - out += 'Last checked: ' + item['attrs']['__custom']['last_check'] + '
'; - out += 'Last state change: ' + item['attrs']['__custom']['last_state_change']; - out += '

'; + out += '

'; + out += 'Last checked: ' + item['attrs']['__custom']['last_check'] + '
'; + out += 'Last state change: ' + item['attrs']['__custom']['last_state_change']; + out += '

'; + } out += '
'; }); diff --git a/statuspage/static/style.css b/statuspage/static/style.css index f503a55..42512ec 100644 --- a/statuspage/static/style.css +++ b/statuspage/static/style.css @@ -62,17 +62,11 @@ h2 { cursor: pointer; } -.service_ok .output, .service_ok .statusline { - display: none; -} - -.service_ok:hover .output, .service_ok:hover .statusline { - display: block; -} - .service h3 { font-weight: normal; line-height: 1em; + vertical-align: middle; + padding: 3px; } .output { @@ -95,7 +89,7 @@ h2 { padding: 2px 10px; margin-right: 15px; color: #444444; - vertical-align: text-top; + vertical-align: middle; font-weight: normal; }