Merge pull request #15 from adriaaah/revert-14-small-beautify
Revert "Beautify"
This commit is contained in:
commit
b6d9fc1a28
|
@ -1,104 +1,104 @@
|
|||
.server-link a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
text-decoration: underline;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #999;
|
||||
padding: 10px;
|
||||
background-color: #999;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: arial;
|
||||
font-family: arial;
|
||||
}
|
||||
|
||||
tr:nth-child(odd) {
|
||||
background-color: #fff;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
background-color: #f2f2f2;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #cb0017;
|
||||
font-weight: bolder;
|
||||
color: #cb0017;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
button.accordion {
|
||||
color: #FFF;
|
||||
cursor: pointer;
|
||||
padding: 18px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: 0.4s;
|
||||
margin: 0.6rem 0;
|
||||
color: #FFF;
|
||||
cursor: pointer;
|
||||
padding: 18px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: 0.4s;
|
||||
margin: 0.6rem 0;
|
||||
}
|
||||
|
||||
button.download-button {
|
||||
color: white;
|
||||
background-color: #00a8ff;
|
||||
cursor: pointer;
|
||||
padding: 18px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: 0.4s;
|
||||
float: right;
|
||||
margin: auto 0;
|
||||
color: white;
|
||||
background-color: #00a8ff;
|
||||
cursor: pointer;
|
||||
padding: 18px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
outline: none;
|
||||
transition: 0.4s;
|
||||
float: right;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
div.download-header {
|
||||
height: 7%;
|
||||
background-color: #273c75;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 20px;
|
||||
height: 7%;
|
||||
background-color: #273c75;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
div.panel {
|
||||
padding: 0 18px;
|
||||
background-color: white;
|
||||
display: none;
|
||||
padding: 0 18px;
|
||||
background-color: white;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.panel.show {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #79bd8f;
|
||||
font-size: 20px;
|
||||
background-color: #79bd8f;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.green:hover {
|
||||
background-color: #588a68;
|
||||
background-color: #588a68;
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: #d9534f;
|
||||
font-size: 20px;
|
||||
background-color: #d9534f;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.red:hover {
|
||||
background-color: #c9302c;
|
||||
background-color: #c9302c;
|
||||
}
|
||||
|
||||
.canvas-container {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 200;
|
||||
margin-bottom: 100;
|
||||
margin-top:200;
|
||||
margin-bottom:100;
|
||||
}
|
||||
|
||||
.canvas-graph {
|
||||
|
@ -108,12 +108,12 @@ div.panel.show {
|
|||
position: relative;
|
||||
background-color: white;
|
||||
margin: 20px 0;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)
|
||||
}
|
||||
|
||||
.canvas-header {
|
||||
padding: 1rem;
|
||||
height: 2rem;
|
||||
background-color: #F2F2F2;
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
height: 2rem;
|
||||
background-color: #F2F2F2;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
@ -1,104 +1,102 @@
|
|||
$def with (output, now)
|
||||
|
||||
<body onload="draw($output[0]['s_rate']);">
|
||||
$ errors = 0
|
||||
$ color = "green"
|
||||
<div>
|
||||
<div class="download-header">
|
||||
<button class="download-button" onclick="window.location.href = 'download';">Download Report</button>
|
||||
</div>
|
||||
<div style="height: 100%;border-right:2px solid #ccc; padding:5px;overflow-x: hidden; float:left; width:48%">
|
||||
$for server in range(len(output)):
|
||||
$code:
|
||||
errors = 0
|
||||
color = "green"
|
||||
$ errors = 0
|
||||
$ color = "green"
|
||||
<div>
|
||||
<div class="download-header">
|
||||
<button class="download-button" onclick="window.location.href = 'download';">Download Report</button>
|
||||
</div>
|
||||
<div style="height: 100%;border-right:2px solid #ccc; padding:5px;overflow-x: hidden; float:left; width:48%">
|
||||
$for server in range(len(output)):
|
||||
$code:
|
||||
errors = 0
|
||||
color = "green"
|
||||
|
||||
$for check in output[server]['result'].keys():
|
||||
$ isError = output[server]['result'].get(check)
|
||||
$if isError != 0:
|
||||
$code:
|
||||
errors=errors+1
|
||||
$for check in output[server]['result'].keys():
|
||||
$ isError = output[server]['result'].get(check)
|
||||
$if isError != 0:
|
||||
$code:
|
||||
errors=errors+1
|
||||
|
||||
$if errors > 0:
|
||||
$code:
|
||||
color = "red"
|
||||
<button class="accordion ${color}" onmouseenter="draw($output[server]['s_rate'])">$output[server]['name']: $errors error(s)</button>
|
||||
<div class="panel">
|
||||
$if errors > 0:
|
||||
$code:
|
||||
color = "red"
|
||||
<button class="accordion ${color}" onmouseenter="draw($output[server]['s_rate'])">$output[server]['name']: $errors error(s)</button>
|
||||
<div class="panel">
|
||||
|
||||
<br>
|
||||
<table width=100%>
|
||||
<thead class="server-link">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
$for check in output[server]['result'].keys():
|
||||
$ isError = output[server]['result'].get(check)
|
||||
$if isError != 0:
|
||||
<tr>
|
||||
<td><a href="$output[server]['url']/$check" target="_blank">$check</a></td>
|
||||
<td><a href="$output[server]['url']/$check" target="_blank"><img src="static/img/error.png"></a></td>
|
||||
</tr>
|
||||
$else:
|
||||
<tr>
|
||||
<td>$check</td>
|
||||
<td><img src="static/img/ok.png"></td>
|
||||
</tr>
|
||||
<br>
|
||||
<table width=100%>
|
||||
<thead class="server-link">
|
||||
<tr><th colspan="2">
|
||||
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
||||
</th></tr>
|
||||
</thead>
|
||||
$for check in output[server]['result'].keys():
|
||||
$ isError = output[server]['result'].get(check)
|
||||
$if isError != 0:
|
||||
<tr>
|
||||
<td><a href="$output[server]['url']/$check"
|
||||
target="_blank">$check</a></td>
|
||||
<td><a href="$output[server]['url']/$check"
|
||||
target="_blank"><img src="static/img/error.png"></a></td>
|
||||
</tr>
|
||||
$else:
|
||||
<tr>
|
||||
<td>$check</td>
|
||||
<td><img src="static/img/ok.png"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
$else:
|
||||
$code:
|
||||
color = "green"
|
||||
<button class="accordion ${color}" onmouseenter="draw($output[server]['s_rate'])">$output[server]['name']</button>
|
||||
<div class="panel">
|
||||
</table>
|
||||
</div>
|
||||
$else:
|
||||
$code:
|
||||
color = "green"
|
||||
<button class="accordion ${color}" onmouseenter="draw($output[server]['s_rate'])">$output[server]['name']</button>
|
||||
<div class="panel">
|
||||
|
||||
<br>
|
||||
<table width=100%>
|
||||
<thead class="server-link">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
$for check in output[server]['result'].keys():
|
||||
$ isError = output[server]['result'].get(check)
|
||||
$if isError != 0:
|
||||
<tr>
|
||||
<td><a href="$output[server]['url']/$check" target="_blank">$check</a></td>
|
||||
<td><a href="$output[server]['url']/$check" target="_blank"><img src="static/img/error.png"></a></td>
|
||||
</tr>
|
||||
$else:
|
||||
<tr>
|
||||
<td>$check</td>
|
||||
<td><img src="static/img/ok.png"></td>
|
||||
</tr>
|
||||
<br>
|
||||
<table width=100%>
|
||||
<thead class="server-link">
|
||||
<tr><th colspan="2">
|
||||
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
||||
</th></tr>
|
||||
</thead>
|
||||
$for check in output[server]['result'].keys():
|
||||
$ isError = output[server]['result'].get(check)
|
||||
$if isError != 0:
|
||||
<tr>
|
||||
<td><a href="$output[server]['url']/$check"
|
||||
target="_blank">$check</a></td>
|
||||
<td><a href="$output[server]['url']/$check"
|
||||
target="_blank"><img src="static/img/error.png"></a></td>
|
||||
</tr>
|
||||
$else:
|
||||
<tr>
|
||||
<td>$check</td>
|
||||
<td><img src="static/img/ok.png"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="canvas-container">
|
||||
<div class="canvas-graph">
|
||||
<div class="canvas-header">
|
||||
<h2 style="margin: 0">Hosts status</h2>
|
||||
</div>
|
||||
<canvas id="canvas" width="400" height="400"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="canvas-container">
|
||||
<div class="canvas-graph">
|
||||
<div class="canvas-header"><h2 style="margin: 0">Hosts status</h2></div>
|
||||
<canvas id="canvas" width="400" height="400"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: 10%; float:right">
|
||||
<br><br><br>
|
||||
Latest update: $now.day/$now.month/$now.year, $now.hour:$now.minute:$now.second
|
||||
<br><br>
|
||||
<a href="/">Home</a> | <a href="/help">Help</a>
|
||||
</div>
|
||||
<div style="height: 10%; float:right">
|
||||
<br><br><br>
|
||||
Latest update: $now.day/$now.month/$now.year, $now.hour:$now.minute:$now.second
|
||||
<br><br>
|
||||
<a href="/">Home</a> | <a href="/help">Help</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script src="static/monit-dashboard.js" type="text/javascript"></script>
|
||||
|
|
|
@ -3,14 +3,14 @@ $def with (content)
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>Monit Dashboard</title>
|
||||
<link rel="stylesheet" type="text/css" href="static/monit-dashboard.css" />
|
||||
<meta http-equiv="refresh" content="300">
|
||||
<title>Monit Dashboard</title>
|
||||
<link rel="stylesheet" type="text/css" href="static/monit-dashboard.css" />
|
||||
<meta http-equiv="refresh" content="300">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
$:content
|
||||
$:content
|
||||
|
||||
</body>
|
||||
|
||||
|
|
Loading…
Reference in a new issue