forked from GithubBackups/healthchecks
Nicer alert email template, and plain text versions for all emails.
This commit is contained in:
parent
2df92c9c9e
commit
abd19ac901
@ -1,92 +1,17 @@
|
||||
{% load humanize hc_extras %}
|
||||
{% extends "emails/base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<style>
|
||||
th {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
}
|
||||
<h1>Hello,</h1>
|
||||
<p>
|
||||
This is a notification sent by <a href="https://healthchecks.io">healthchecks.io</a>.
|
||||
<br />
|
||||
The check <strong>{{ check.name_then_code }}</strong>
|
||||
has gone <strong>{{ check.status|upper }}</strong>.
|
||||
</p>
|
||||
|
||||
td {
|
||||
border-top: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 10px;
|
||||
color: white;
|
||||
padding: 4px;
|
||||
font-family: sans;
|
||||
}
|
||||
|
||||
.new { background: #AAA; }
|
||||
.up { background: #5cb85c; }
|
||||
.grace { background: #f0ad4e; }
|
||||
.down { background: #d9534f; }
|
||||
|
||||
|
||||
.unnamed {
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Hello,</p>
|
||||
<p>This is a notification sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
|
||||
<p>The check "{{ check.name_then_code }}" has gone {{ check.status }}.</p>
|
||||
<p>Here is a summary of all your checks:</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Period</th>
|
||||
<th>Last Ping</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for check in checks %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if check.get_status == "new" %}
|
||||
<span class="badge new">NEW</span>
|
||||
{% elif check.in_grace_period %}
|
||||
<span class="badge grace">LATE</span>
|
||||
{% elif check.get_status == "up" %}
|
||||
<span class="badge up">UP</span>
|
||||
{% elif check.get_status == "down" %}
|
||||
<span class="badge down">DOWN</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if check.name %}
|
||||
{{ check.name }}
|
||||
{% else %}
|
||||
<span class="unnamed">unnamed</span>
|
||||
{% endif %}
|
||||
{% if check.tags %}
|
||||
<br />
|
||||
<small>{{ check.tags }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ check.timeout|hc_duration }}
|
||||
</td>
|
||||
<td>
|
||||
{% if check.last_ping %}
|
||||
{{ check.last_ping|naturaltime }}
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ check.log_url }}">View Log</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% include "emails/summary-html.html" %}
|
||||
|
||||
<p>
|
||||
--<br />
|
||||
Regards,<br />
|
||||
healthchecks.io
|
||||
</p>
|
||||
<p>Thanks,<br>The Healthchecks<span>.</span>io</a> Team</p>
|
||||
{% endblock %}
|
||||
|
@ -3,6 +3,10 @@ Hello,
|
||||
This is a notification sent by healthchecks.io.
|
||||
The check "{{ check.name_then_code }}" has gone {{ check.status }}.
|
||||
|
||||
Here is a summary of all your checks:
|
||||
|
||||
{% include 'emails/summary-text.html' %}
|
||||
|
||||
--
|
||||
Regards,
|
||||
healthchecks.io
|
||||
|
@ -1,100 +1,12 @@
|
||||
{% extends "emails/base.html" %}
|
||||
|
||||
{% load humanize hc_extras %}
|
||||
|
||||
{% block content %}
|
||||
<style>
|
||||
.checks {
|
||||
margin: 30px 0;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.checks th {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.checks td {
|
||||
border-top: 1px solid #EDEFF2;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 10px;
|
||||
color: white;
|
||||
padding: 4px;
|
||||
font-family: sans;
|
||||
}
|
||||
|
||||
.new { background: #AAA; }
|
||||
.up { background: #5cb85c; }
|
||||
.grace { background: #f0ad4e; }
|
||||
.down { background: #d9534f; }
|
||||
|
||||
|
||||
.unnamed {
|
||||
color: #74787E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.view-log {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<h1>Hello,</h1>
|
||||
<p>This is a monthly report sent by <a href="https://healthchecks.io">healthchecks.io</a>.</p>
|
||||
|
||||
<table class="checks" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Period</th>
|
||||
<th>Last Ping</th>
|
||||
</tr>
|
||||
{% for check in checks %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if check.get_status == "new" %}
|
||||
<span class="badge new">NEW</span>
|
||||
{% elif check.in_grace_period %}
|
||||
<span class="badge grace">LATE</span>
|
||||
{% elif check.get_status == "up" %}
|
||||
<span class="badge up">UP</span>
|
||||
{% elif check.get_status == "down" %}
|
||||
<span class="badge down">DOWN</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if check.name %}
|
||||
{{ check.name }}
|
||||
{% else %}
|
||||
<span class="unnamed">unnamed</span>
|
||||
{% endif %}
|
||||
{% if check.tags %}
|
||||
<br />
|
||||
<small>{{ check.tags }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ check.timeout|hc_duration }}
|
||||
</td>
|
||||
<td>
|
||||
{% if check.last_ping %}
|
||||
{{ check.last_ping|naturaltime }}
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a class="view-log" href="{{ check.log_url }}">View Log</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% include "emails/summary-html.html" %}
|
||||
|
||||
<p><strong>Just one more thing to check:</strong>
|
||||
Do you have more cron jobs,
|
||||
@ -102,9 +14,9 @@ not yet on this list, that would benefit from monitoring?
|
||||
Get the ball rolling by adding one more!</p>
|
||||
|
||||
<p>Cheers,<br>The Healthchecks<span>.</span>io</a> Team</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block unsub %}
|
||||
<br />
|
||||
<a href="{{ unsub_link }}">Unsubscribe from future monthly reports</a>
|
||||
|
10
templates/emails/report-body-text.html
Normal file
10
templates/emails/report-body-text.html
Normal file
@ -0,0 +1,10 @@
|
||||
Hello,
|
||||
|
||||
This is a monthly report sent by healthchecks.io.
|
||||
|
||||
{% include 'emails/summary-text.html' %}
|
||||
|
||||
--
|
||||
Cheers,
|
||||
healthchecks.io
|
||||
|
10
templates/emails/set-password-body-text.html
Normal file
10
templates/emails/set-password-body-text.html
Normal file
@ -0,0 +1,10 @@
|
||||
Hello,
|
||||
|
||||
Here's a link to set a password for your account on healthchecks.io:
|
||||
|
||||
{{ set_password_link }}
|
||||
|
||||
|
||||
--
|
||||
Regards,
|
||||
healthchecks.io
|
91
templates/emails/summary-html.html
Normal file
91
templates/emails/summary-html.html
Normal file
@ -0,0 +1,91 @@
|
||||
{% load humanize hc_extras %}
|
||||
|
||||
<style>
|
||||
.checks {
|
||||
margin: 30px 0;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.checks th {
|
||||
text-align: left;
|
||||
padding: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.checks td {
|
||||
border-top: 1px solid #EDEFF2;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 10px;
|
||||
color: white;
|
||||
padding: 4px;
|
||||
font-family: sans;
|
||||
}
|
||||
|
||||
.new { background: #AAA; }
|
||||
.up { background: #5cb85c; }
|
||||
.grace { background: #f0ad4e; }
|
||||
.down { background: #d9534f; }
|
||||
|
||||
|
||||
.unnamed {
|
||||
color: #74787E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.view-log {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<table class="checks" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Period</th>
|
||||
<th>Last Ping</th>
|
||||
</tr>
|
||||
{% for check in checks %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if check.get_status == "new" %}
|
||||
<span class="badge new">NEW</span>
|
||||
{% elif check.in_grace_period %}
|
||||
<span class="badge grace">LATE</span>
|
||||
{% elif check.get_status == "up" %}
|
||||
<span class="badge up">UP</span>
|
||||
{% elif check.get_status == "down" %}
|
||||
<span class="badge down">DOWN</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if check.name %}
|
||||
{{ check.name }}
|
||||
{% else %}
|
||||
<span class="unnamed">unnamed</span>
|
||||
{% endif %}
|
||||
{% if check.tags %}
|
||||
<br />
|
||||
<small>{{ check.tags }}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ check.timeout|hc_duration }}
|
||||
</td>
|
||||
<td>
|
||||
{% if check.last_ping %}
|
||||
{{ check.last_ping|naturaltime }}
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a class="view-log" href="{{ check.log_url }}">View Log</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
5
templates/emails/summary-text.html
Normal file
5
templates/emails/summary-text.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% load humanize hc_extras %}
|
||||
Status | Name | Last Ping
|
||||
--------+------------------------------------------+-----------------------{% for check in checks %}
|
||||
{{ check.get_status|ljust:"6" }} | {{ check.name|default:'unnamed'|ljust:"40" }} | {% if check.last_ping %}{{ check.last_ping|naturaltime }}{% else %}Never{% endif %}{% endfor %}
|
||||
|
10
templates/emails/verify-email-body-text.html
Normal file
10
templates/emails/verify-email-body-text.html
Normal file
@ -0,0 +1,10 @@
|
||||
Hello,
|
||||
|
||||
To start receiving healthchecks.io notification to this address,
|
||||
please follow the link below:
|
||||
|
||||
{{ verify_link }}
|
||||
|
||||
--
|
||||
Regards,
|
||||
healthchecks.io
|
Loading…
x
Reference in New Issue
Block a user