commit
35ff7b0e94
|
@ -97,8 +97,8 @@ div.panel.show {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top:200;
|
margin-top: 200;
|
||||||
margin-bottom:100;
|
margin-bottom: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.canvas-graph {
|
.canvas-graph {
|
||||||
|
@ -108,7 +108,7 @@ div.panel.show {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
margin: 20px 0;
|
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 {
|
.canvas-header {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
$def with (output, now)
|
$def with (output, now)
|
||||||
|
|
||||||
<body onload="draw($output[0]['s_rate']);">
|
<body onload="draw($output[0]['s_rate']);">
|
||||||
$ errors = 0
|
$ errors = 0
|
||||||
$ color = "green"
|
$ color = "green"
|
||||||
<div>
|
<div>
|
||||||
<div class="download-header">
|
<div class="download-header">
|
||||||
<button class="download-button" onclick="window.location.href = 'download';">Download Report</button>
|
<button class="download-button" onclick="window.location.href = 'download';">Download Report</button>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 100%;border-right:2px solid #ccc; padding:5px;overflow-x: hidden; float:left; width:48%">
|
<div style="height: 100%;border-right:2px solid #ccc; padding:5px;overflow-x: hidden; float:left; width:48%">
|
||||||
$for server in range(len(output)):
|
$for server in range(len(output)):
|
||||||
$code:
|
$code:
|
||||||
errors = 0
|
errors = 0
|
||||||
color = "green"
|
color = "green"
|
||||||
|
@ -28,18 +28,18 @@ $for server in range(len(output)):
|
||||||
<br>
|
<br>
|
||||||
<table width=100%>
|
<table width=100%>
|
||||||
<thead class="server-link">
|
<thead class="server-link">
|
||||||
<tr><th colspan="2">
|
<tr>
|
||||||
|
<th colspan="2">
|
||||||
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
||||||
</th></tr>
|
</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
$for check in output[server]['result'].keys():
|
$for check in output[server]['result'].keys():
|
||||||
$ isError = output[server]['result'].get(check)
|
$ isError = output[server]['result'].get(check)
|
||||||
$if isError != 0:
|
$if isError != 0:
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="$output[server]['url']/$check"
|
<td><a href="$output[server]['url']/$check" target="_blank">$check</a></td>
|
||||||
target="_blank">$check</a></td>
|
<td><a href="$output[server]['url']/$check" target="_blank"><img src="static/img/error.png"></a></td>
|
||||||
<td><a href="$output[server]['url']/$check"
|
|
||||||
target="_blank"><img src="static/img/error.png"></a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
$else:
|
$else:
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -58,18 +58,18 @@ $for server in range(len(output)):
|
||||||
<br>
|
<br>
|
||||||
<table width=100%>
|
<table width=100%>
|
||||||
<thead class="server-link">
|
<thead class="server-link">
|
||||||
<tr><th colspan="2">
|
<tr>
|
||||||
|
<th colspan="2">
|
||||||
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
<a href="$output[server]['url']" target="_blank">$output[server]['name']</a>
|
||||||
</th></tr>
|
</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
$for check in output[server]['result'].keys():
|
$for check in output[server]['result'].keys():
|
||||||
$ isError = output[server]['result'].get(check)
|
$ isError = output[server]['result'].get(check)
|
||||||
$if isError != 0:
|
$if isError != 0:
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="$output[server]['url']/$check"
|
<td><a href="$output[server]['url']/$check" target="_blank">$check</a></td>
|
||||||
target="_blank">$check</a></td>
|
<td><a href="$output[server]['url']/$check" target="_blank"><img src="static/img/error.png"></a></td>
|
||||||
<td><a href="$output[server]['url']/$check"
|
|
||||||
target="_blank"><img src="static/img/error.png"></a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
$else:
|
$else:
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -79,24 +79,26 @@ $for server in range(len(output)):
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="canvas-container">
|
<div class="canvas-container">
|
||||||
<div class="canvas-graph">
|
<div class="canvas-graph">
|
||||||
<div class="canvas-header"><h2 style="margin: 0">Hosts status</h2></div>
|
<div class="canvas-header">
|
||||||
<canvas id="canvas" width="400" height="400"></canvas>
|
<h2 style="margin: 0">Hosts status</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<canvas id="canvas" width="400" height="400"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="height: 10%; float:right">
|
<div style="height: 10%; float:right">
|
||||||
<br><br><br>
|
<br><br><br>
|
||||||
Latest update: $now.day/$now.month/$now.year, $now.hour:$now.minute:$now.second
|
Latest update: $now.day/$now.month/$now.year, $now.hour:$now.minute:$now.second
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="/">Home</a> | <a href="/help">Help</a>
|
<a href="/">Home</a> | <a href="/help">Help</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script src="static/monit-dashboard.js" type="text/javascript"></script>
|
<script src="static/monit-dashboard.js" type="text/javascript"></script>
|
||||||
|
|
Loading…
Reference in a new issue