forked from GithubBackups/healthchecks
Nicer html report
This commit is contained in:
parent
b0f8763465
commit
2df92c9c9e
@ -1,26 +1,28 @@
|
|||||||
|
from django.conf import settings
|
||||||
from djmail.template_mail import InlineCSSTemplateMail
|
from djmail.template_mail import InlineCSSTemplateMail
|
||||||
|
|
||||||
|
|
||||||
def login(to, ctx):
|
def send(name, to, ctx):
|
||||||
o = InlineCSSTemplateMail("login")
|
o = InlineCSSTemplateMail(name)
|
||||||
|
ctx["SITE_ROOT"] = settings.SITE_ROOT
|
||||||
o.send(to, ctx)
|
o.send(to, ctx)
|
||||||
|
|
||||||
|
|
||||||
|
def login(to, ctx):
|
||||||
|
send("login", to, ctx)
|
||||||
|
|
||||||
|
|
||||||
def set_password(to, ctx):
|
def set_password(to, ctx):
|
||||||
o = InlineCSSTemplateMail("set-password")
|
send("set-password", to, ctx)
|
||||||
o.send(to, ctx)
|
|
||||||
|
|
||||||
|
|
||||||
def alert(to, ctx):
|
def alert(to, ctx):
|
||||||
o = InlineCSSTemplateMail("alert")
|
send("alert", to, ctx)
|
||||||
o.send(to, ctx)
|
|
||||||
|
|
||||||
|
|
||||||
def verify_email(to, ctx):
|
def verify_email(to, ctx):
|
||||||
o = InlineCSSTemplateMail("verify-email")
|
send("verify-email", to, ctx)
|
||||||
o.send(to, ctx)
|
|
||||||
|
|
||||||
|
|
||||||
def report(to, ctx):
|
def report(to, ctx):
|
||||||
o = InlineCSSTemplateMail("report")
|
send("report", to, ctx)
|
||||||
o.send(to, ctx)
|
|
||||||
|
@ -79,7 +79,10 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.email-footer p {
|
.email-footer p {
|
||||||
color: #AEAEAE;
|
color: #74787E;
|
||||||
|
}
|
||||||
|
.email-footer a {
|
||||||
|
color: #74787E;
|
||||||
}
|
}
|
||||||
.body-action {
|
.body-action {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -181,7 +184,7 @@
|
|||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="email-masthead">
|
<td class="email-masthead">
|
||||||
<a class="email-masthead_name">Healthchecks</a>
|
<img src="{{ SITE_ROOT }}/img/logo-full.png" alt="" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Email Body -->
|
<!-- Email Body -->
|
||||||
@ -202,7 +205,9 @@
|
|||||||
<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0">
|
<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="content-cell">
|
<td class="content-cell">
|
||||||
<p class="sub center">© 2016 healthchecks<span>.</span>io. All rights reserved.</p>
|
<p class="sub center">© 2016 healthchecks<span>.</span>io. All rights reserved.
|
||||||
|
{% block unsub %}{% endblock %}
|
||||||
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
|
{% extends "emails/base.html" %}
|
||||||
|
|
||||||
{% load humanize hc_extras %}
|
{% load humanize hc_extras %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
<style>
|
<style>
|
||||||
th {
|
.checks {
|
||||||
text-align: left;
|
margin: 30px 0;
|
||||||
padding: 8px;
|
width: 100%;
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
.checks th {
|
||||||
border-top: 1px solid #ddd;
|
text-align: left;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checks td {
|
||||||
|
border-top: 1px solid #EDEFF2;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,16 +35,20 @@
|
|||||||
|
|
||||||
|
|
||||||
.unnamed {
|
.unnamed {
|
||||||
color: #888;
|
color: #74787E;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.view-log {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<p>Hello,</p>
|
<h1>Hello,</h1>
|
||||||
<p>This is a monthly report sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
|
<p>This is a monthly report sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
|
||||||
|
|
||||||
<table>
|
<table class="checks" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -76,7 +90,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ check.log_url }}">View Log</a>
|
<a class="view-log" href="{{ check.log_url }}">View Log</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -87,12 +101,11 @@ Do you have more cron jobs,
|
|||||||
not yet on this list, that would benefit from monitoring?
|
not yet on this list, that would benefit from monitoring?
|
||||||
Get the ball rolling by adding one more!</p>
|
Get the ball rolling by adding one more!</p>
|
||||||
|
|
||||||
<p>
|
<p>Cheers,<br>The Healthchecks<span>.</span>io</a> Team</p>
|
||||||
--<br />
|
|
||||||
Regards,<br />
|
|
||||||
healthchecks.io
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
{% endblock %}
|
||||||
<a href="{{ unsub_link }}">Unsubscribe from future monthly reports</a>
|
|
||||||
</p>
|
{% block unsub %}
|
||||||
|
<br />
|
||||||
|
<a href="{{ unsub_link }}">Unsubscribe from future monthly reports</a>
|
||||||
|
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user