Browse Source

"Details..." instead of "Show Log..." in emails.

pull/193/head
Pēteris Caune 6 years ago
parent
commit
78aca869c5
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
4 changed files with 18 additions and 5 deletions
  1. +2
    -2
      hc/api/models.py
  2. +13
    -0
      templates/emails/alert-body-html.html
  3. +2
    -2
      templates/emails/summary-html.html
  4. +1
    -1
      templates/integrations/zendesk_description.html

+ 2
- 2
hc/api/models.py View File

@ -85,8 +85,8 @@ class Check(models.Model):
def url(self):
return settings.PING_ENDPOINT + str(self.code)
def log_url(self):
return settings.SITE_ROOT + reverse("hc-log", args=[self.code])
def details_url(self):
return settings.SITE_ROOT + reverse("hc-details", args=[self.code])
def email(self):
return "%s@%s" % (self.code, settings.PING_EMAIL_DOMAIN)


+ 13
- 0
templates/emails/alert-body-html.html View File

@ -17,6 +17,19 @@ Here is a summary of your checks:
Thanks,<br>
The {% escaped_site_name %} Team
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"url": "{{ check.details_url }}",
"name": "View in {% site_name%}"
},
"description": "View in {% site_name%}"
}
</script>
{% endblock %}
{% block unsub %}


+ 2
- 2
templates/emails/summary-html.html View File

@ -59,11 +59,11 @@
<td class="mobile-hide" style="border-top: 1px solid #EDEFF2; padding: 16px 8px; font-family: Helvetica, Arial, sans-serif;">
{% if check.last_ping %}
{{ check.last_ping|naturaltime }}
<br />
<a class="view-log" href="{{ check.log_url }}">Show Log…</a>
{% else %}
Never
{% endif %}
<br />
<a class="view-log" href="{{ check.details_url }}">Details…</a>
</td>
</tr>
{% endfor %}


+ 1
- 1
templates/integrations/zendesk_description.html View File

@ -2,7 +2,7 @@
{% if check.status == "down" %}
{{ check.name_then_code }} is down.
Last ping was {{ check.last_ping|naturaltime }}.
Log: {{ check.log_url }}
Details: {{ check.details_url }}
{% else %}
{{ check.name_then_code }} received a ping and is now UP
{% endif %}

Loading…
Cancel
Save