forked from GithubBackups/healthchecks
"Details..." instead of "Show Log..." in emails.
This commit is contained in:
parent
1b664a6b54
commit
78aca869c5
@ -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)
|
||||
|
@ -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 %}
|
||||
|
@ -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 %}
|
||||
|
@ -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…
x
Reference in New Issue
Block a user