From abd19ac9014c31395ed16a595bf2cc1c66ac6d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Sat, 25 Jun 2016 05:59:48 +0300 Subject: [PATCH] Nicer alert email template, and plain text versions for all emails. --- templates/emails/alert-body-html.html | 99 +++----------------- templates/emails/alert-body-text.html | 4 + templates/emails/report-body-html.html | 92 +----------------- templates/emails/report-body-text.html | 10 ++ templates/emails/set-password-body-text.html | 10 ++ templates/emails/summary-html.html | 91 ++++++++++++++++++ templates/emails/summary-text.html | 5 + templates/emails/verify-email-body-text.html | 10 ++ 8 files changed, 144 insertions(+), 177 deletions(-) create mode 100644 templates/emails/report-body-text.html create mode 100644 templates/emails/set-password-body-text.html create mode 100644 templates/emails/summary-html.html create mode 100644 templates/emails/summary-text.html create mode 100644 templates/emails/verify-email-body-text.html diff --git a/templates/emails/alert-body-html.html b/templates/emails/alert-body-html.html index 4016fa1c..183ed530 100644 --- a/templates/emails/alert-body-html.html +++ b/templates/emails/alert-body-html.html @@ -1,92 +1,17 @@ -{% load humanize hc_extras %} +{% extends "emails/base.html" %} +{% block content %} - +

Hello,

+

+ This is a notification sent by healthchecks.io. +
+ The check {{ check.name_then_code }} + has gone {{ check.status|upper }}. +

-

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:

- - - - - - - - - {% for check in checks %} - - - - - - - - {% endfor %} -
NamePeriodLast PingActions
- {% if check.get_status == "new" %} - NEW - {% elif check.in_grace_period %} - LATE - {% elif check.get_status == "up" %} - UP - {% elif check.get_status == "down" %} - DOWN - {% endif %} - - {% if check.name %} - {{ check.name }} - {% else %} - unnamed - {% endif %} - {% if check.tags %} -
- {{ check.tags }} - {% endif %} -
- {{ check.timeout|hc_duration }} - - {% if check.last_ping %} - {{ check.last_ping|naturaltime }} - {% else %} - Never - {% endif %} - - View Log -
+{% include "emails/summary-html.html" %} -

- --
- Regards,
- healthchecks.io -

+

Thanks,
The Healthchecks.io Team

+{% endblock %} diff --git a/templates/emails/alert-body-text.html b/templates/emails/alert-body-text.html index ca4b1de5..a5bc0d4f 100644 --- a/templates/emails/alert-body-text.html +++ b/templates/emails/alert-body-text.html @@ -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 diff --git a/templates/emails/report-body-html.html b/templates/emails/report-body-html.html index 67bfe17d..5a3fcecf 100644 --- a/templates/emails/report-body-html.html +++ b/templates/emails/report-body-html.html @@ -1,100 +1,12 @@ {% extends "emails/base.html" %} - {% load humanize hc_extras %} {% block content %} -

Hello,

This is a monthly report sent by healthchecks.io.

- - - - - - - - {% for check in checks %} - - - - - - - - {% endfor %} -
NamePeriodLast Ping
- {% if check.get_status == "new" %} - NEW - {% elif check.in_grace_period %} - LATE - {% elif check.get_status == "up" %} - UP - {% elif check.get_status == "down" %} - DOWN - {% endif %} - - {% if check.name %} - {{ check.name }} - {% else %} - unnamed - {% endif %} - {% if check.tags %} -
- {{ check.tags }} - {% endif %} -
- {{ check.timeout|hc_duration }} - - {% if check.last_ping %} - {{ check.last_ping|naturaltime }} - {% else %} - Never - {% endif %} - - View Log -
+{% include "emails/summary-html.html" %}

Just one more thing to check: 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!

Cheers,
The Healthchecks.io Team

- {% endblock %} + {% block unsub %}
Unsubscribe from future monthly reports diff --git a/templates/emails/report-body-text.html b/templates/emails/report-body-text.html new file mode 100644 index 00000000..24d09287 --- /dev/null +++ b/templates/emails/report-body-text.html @@ -0,0 +1,10 @@ +Hello, + +This is a monthly report sent by healthchecks.io. + +{% include 'emails/summary-text.html' %} + +-- +Cheers, +healthchecks.io + diff --git a/templates/emails/set-password-body-text.html b/templates/emails/set-password-body-text.html new file mode 100644 index 00000000..62d7862c --- /dev/null +++ b/templates/emails/set-password-body-text.html @@ -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 diff --git a/templates/emails/summary-html.html b/templates/emails/summary-html.html new file mode 100644 index 00000000..e3c9e6ed --- /dev/null +++ b/templates/emails/summary-html.html @@ -0,0 +1,91 @@ +{% load humanize hc_extras %} + + + + + + + + + + + {% for check in checks %} + + + + + + + + {% endfor %} +
NamePeriodLast Ping
+ {% if check.get_status == "new" %} + NEW + {% elif check.in_grace_period %} + LATE + {% elif check.get_status == "up" %} + UP + {% elif check.get_status == "down" %} + DOWN + {% endif %} + + {% if check.name %} + {{ check.name }} + {% else %} + unnamed + {% endif %} + {% if check.tags %} +
+ {{ check.tags }} + {% endif %} +
+ {{ check.timeout|hc_duration }} + + {% if check.last_ping %} + {{ check.last_ping|naturaltime }} + {% else %} + Never + {% endif %} + + View Log +
\ No newline at end of file diff --git a/templates/emails/summary-text.html b/templates/emails/summary-text.html new file mode 100644 index 00000000..5c6e5d37 --- /dev/null +++ b/templates/emails/summary-text.html @@ -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 %} + diff --git a/templates/emails/verify-email-body-text.html b/templates/emails/verify-email-body-text.html new file mode 100644 index 00000000..472192e2 --- /dev/null +++ b/templates/emails/verify-email-body-text.html @@ -0,0 +1,10 @@ +Hello, + +To start receiving healthchecks.io notification to this address, +please follow the link below: + +{{ verify_link }} + +-- +Regards, +healthchecks.io