-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.tpl
45 lines (37 loc) · 1.02 KB
/
report.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<title>BackupChecker Report <%=time.strftime('%Y')%>-<%=time.strftime('%m')%>-<%=time.strftime('%d')%></title>
<style>
tr.valid {background-color: #90EE90;}
tr.invalid {background-color: red;}
</style>
</head>
<body>
<script type="text/javascript">
var now = new Date();
var generated_at = new Date(<%=time.strftime('%Y')%>,<%=int(time.strftime('%m'))-1%>,<%=time.strftime('%d')%>,<%=time.strftime('%H')%>,<%=time.strftime('%M')%>);
var diff = now - generated_at;
if ( diff > 1000 * 60 *60 * 24 ) {
alert("This report is too old! Check backup checker is still running fine!");
}
</script>
<h1>Backup check results <%=time.strftime('%Y')%>-<%=time.strftime('%m')%>-<%=time.strftime('%d')%> <%=time.strftime('%H')%>:<%=time.strftime('%M')%></h1>
<h2>Summary</h2>
<table>
<tr>
<th>Backup</th>
<th>Status</th>
</tr>
#for $backup in $bc.backups
<tr class="$backup.status">
<td>$backup.name</td>
<td>$backup.status</td>
</tr>
#end for
</table>
<h2>Detailed Logs</h2>
<pre>
$bc
</pre>
</body>
</html>