remove on-hover effect, hide output of "ok" services
This commit is contained in:
parent
79cd2f1a39
commit
47d2e42f38
2 changed files with 10 additions and 20 deletions
|
@ -26,24 +26,20 @@ function render_status_page() {
|
|||
last_hostname = item['attrs']['host_name']
|
||||
}
|
||||
|
||||
if (item['attrs']['state'] == 0) {
|
||||
out += '<div class="service service_ok">';
|
||||
} else {
|
||||
out += '<div class="service">';
|
||||
}
|
||||
|
||||
out += '<h3>';
|
||||
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 += '</h3>';
|
||||
|
||||
out += '<pre class="output">' + escape_html(item['attrs']['last_check_result']['output']) + '</pre>';
|
||||
if (item['attrs']['state'] != 0) {
|
||||
out += '<pre class="output">' + escape_html(item['attrs']['last_check_result']['output']) + '</pre>';
|
||||
|
||||
out += '<p class="statusline">';
|
||||
out += 'Last checked: ' + item['attrs']['__custom']['last_check'] + '<br>';
|
||||
out += 'Last state change: ' + item['attrs']['__custom']['last_state_change'];
|
||||
out += '</p>';
|
||||
out += '<p class="statusline">';
|
||||
out += 'Last checked: ' + item['attrs']['__custom']['last_check'] + '<br>';
|
||||
out += 'Last state change: ' + item['attrs']['__custom']['last_state_change'];
|
||||
out += '</p>';
|
||||
}
|
||||
|
||||
out += '</div>';
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue