Move html and template files to /opt/mailstats
This commit is contained in:
15
root/opt/mailstats/templates/mailstats-sub-table.html.pt
Normal file
15
root/opt/mailstats/templates/mailstats-sub-table.html.pt
Normal file
@@ -0,0 +1,15 @@
|
||||
<h2>${title}</h2>
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th tal:repeat="header column_headers">${header}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="item array_2d.items()">
|
||||
<td>${item[0]}</td>
|
||||
<td>${item[1]}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
73
root/opt/mailstats/templates/mailstats.html.pt
Normal file
73
root/opt/mailstats/templates/mailstats.html.pt
Normal file
@@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head><meta charset="utf-8">
|
||||
<title>SMEServer Mailstats</title>
|
||||
<link rel='stylesheet' type='text/css' href='mailstats.css' />
|
||||
<!-- Check links -->
|
||||
<script>
|
||||
function LinkCheck(url){
|
||||
var http = new XMLHttpRequest();
|
||||
http.open('HEAD', url, false);
|
||||
http.send();
|
||||
return http.status!=404;
|
||||
}
|
||||
function doNavs() {
|
||||
var aTags = document.getElementsByTagName('a'),
|
||||
atl = aTags.length,i;
|
||||
for (i = 0; i < atl; i++) {
|
||||
if (aTags[i].innerText == "Previous") {
|
||||
if (!LinkCheck(aTags[i].href)) {
|
||||
aTags[i].style.visibility = "hidden";
|
||||
} else {
|
||||
aTags[i].style.visibility = "visible";
|
||||
}
|
||||
} else if (aTags[i].innerText == "Next") {
|
||||
if (!LinkCheck(aTags[i].href)) {
|
||||
aTags[i].style.visibility = "hidden";
|
||||
} else {
|
||||
aTags[i].style.visibility = "visible";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!---Navigation here-->
|
||||
<h1>${title}</h1>
|
||||
<br />
|
||||
<table border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date/Time</th>
|
||||
<th tal:repeat="header column_headers" tal:content="header">Header</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="row array_2d">
|
||||
<td tal:condition="repeat.row.index == 24" tal:content="'TOTALS'">Totals</td>
|
||||
<td tal:condition="repeat.row.index == 25" tal:content="'PERCENT'">Percent</td>
|
||||
<td tal:condition="repeat.row.index < 24" tal:content="string:${reporting_date}, ${repeat.row.index}">Hour</td>
|
||||
<td tal:repeat="cell row" tal:content="cell">Cell</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!---Add in sub tables here -->
|
||||
<br />
|
||||
<footer>${version}</footer>
|
||||
<script>window.onload = function(){doNavs();} </script>
|
||||
<p class="cssvalid">
|
||||
<a href="http://jigsaw.w3.org/css-validator/check/referer">
|
||||
<img style="border:0;width:88px;height:31px"
|
||||
src="http://jigsaw.w3.org/css-validator/images/vcss"
|
||||
alt="Valid CSS!" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p class="htmlvalid">
|
||||
<a href="https://validator.w3.org/check?uri=referer"><img
|
||||
src="http://www.w3.org/Icons/valid-xhtml10"
|
||||
alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user