Browse Source

Merge pull request #86 from foozmeat/issue-79

adds a SITE_NAME setting that's used to label the site
pull/90/head
Pēteris Caune 8 years ago
committed by GitHub
parent
commit
ac68df5bf5
41 changed files with 131 additions and 93 deletions
  1. +2
    -2
      hc/accounts/tests/test_login.py
  2. +3
    -2
      hc/accounts/tests/test_profile.py
  3. +2
    -1
      hc/api/tests/test_list_checks.py
  4. +17
    -0
      hc/front/templatetags/hc_extras.py
  5. +1
    -0
      hc/settings.py
  6. +5
    -4
      templates/accounts/check_token_submit.html
  7. +4
    -4
      templates/accounts/profile.html
  8. +3
    -2
      templates/accounts/set_password.html
  9. +3
    -2
      templates/base.html
  10. +3
    -2
      templates/base_bare.html
  11. +2
    -1
      templates/emails/alert-body-html.html
  12. +3
    -2
      templates/emails/alert-body-text.html
  13. +3
    -2
      templates/emails/base.html
  14. +5
    -4
      templates/emails/login-body-html.html
  15. +7
    -6
      templates/emails/login-body-text.html
  16. +3
    -2
      templates/emails/login-subject.html
  17. +1
    -1
      templates/emails/report-body-html.html
  18. +3
    -2
      templates/emails/report-body-text.html
  19. +3
    -2
      templates/emails/set-password-body-html.html
  20. +3
    -2
      templates/emails/set-password-body-text.html
  21. +2
    -1
      templates/emails/set-password-subject.html
  22. +3
    -2
      templates/emails/verify-email-body-html.html
  23. +3
    -2
      templates/emails/verify-email-body-text.html
  24. +2
    -1
      templates/emails/verify-email-subject.html
  25. +1
    -1
      templates/front/channels.html
  26. +8
    -8
      templates/front/docs.html
  27. +5
    -5
      templates/front/docs_api.html
  28. +2
    -2
      templates/front/log.html
  29. +2
    -2
      templates/front/my_checks.html
  30. +2
    -1
      templates/front/verify_email_success.html
  31. +2
    -2
      templates/integrations/add_email.html
  32. +2
    -2
      templates/integrations/add_hipchat.html
  33. +2
    -2
      templates/integrations/add_pd.html
  34. +2
    -2
      templates/integrations/add_pushbullet.html
  35. +2
    -2
      templates/integrations/add_pushover.html
  36. +5
    -5
      templates/integrations/add_slack.html
  37. +4
    -4
      templates/integrations/add_victorops.html
  38. +2
    -2
      templates/integrations/add_webhook.html
  39. +2
    -2
      templates/integrations/slack_message.json
  40. +1
    -1
      templates/payments/billing.html
  41. +1
    -1
      templates/payments/invoice.html

+ 2
- 2
hc/accounts/tests/test_login.py View File

@ -2,7 +2,7 @@ from django.contrib.auth.models import User
from django.core import mail from django.core import mail
from django.test import TestCase from django.test import TestCase
from hc.api.models import Check from hc.api.models import Check
from django.conf import settings
class LoginTestCase(TestCase): class LoginTestCase(TestCase):
@ -24,7 +24,7 @@ class LoginTestCase(TestCase):
# And email sent # And email sent
self.assertEqual(len(mail.outbox), 1) self.assertEqual(len(mail.outbox), 1)
self.assertEqual(mail.outbox[0].subject, 'Log in to healthchecks.io')
self.assertEqual(mail.outbox[0].subject, 'Log in to {0}'.format(getattr(settings, "SITE_NAME")))
# And check should be associated with the new user # And check should be associated with the new user
check_again = Check.objects.get(code=check.code) check_again = Check.objects.get(code=check.code)


+ 3
- 2
hc/accounts/tests/test_profile.py View File

@ -3,6 +3,7 @@ from django.core import mail
from hc.test import BaseTestCase from hc.test import BaseTestCase
from hc.accounts.models import Member from hc.accounts.models import Member
from hc.api.models import Check from hc.api.models import Check
from django.conf import settings
class ProfileTestCase(BaseTestCase): class ProfileTestCase(BaseTestCase):
@ -21,7 +22,7 @@ class ProfileTestCase(BaseTestCase):
# And an email should have been sent # And an email should have been sent
self.assertEqual(len(mail.outbox), 1) self.assertEqual(len(mail.outbox), 1)
expected_subject = 'Set password on healthchecks.io'
expected_subject = 'Set password on {0}'.format(getattr(settings, "SITE_NAME"))
self.assertEqual(mail.outbox[0].subject, expected_subject) self.assertEqual(mail.outbox[0].subject, expected_subject)
def test_it_creates_api_key(self): def test_it_creates_api_key(self):
@ -74,7 +75,7 @@ class ProfileTestCase(BaseTestCase):
# And an email should have been sent # And an email should have been sent
subj = ('You have been invited to join' subj = ('You have been invited to join'
' [email protected] on healthchecks.io')
' [email protected] on {0}'.format(getattr(settings, "SITE_NAME")))
self.assertEqual(mail.outbox[0].subject, subj) self.assertEqual(mail.outbox[0].subject, subj)
def test_add_team_member_checks_team_access_allowed_flag(self): def test_add_team_member_checks_team_access_allowed_flag(self):


+ 2
- 1
hc/api/tests/test_list_checks.py View File

@ -1,6 +1,7 @@
import json import json
from datetime import timedelta as td from datetime import timedelta as td
from django.utils.timezone import now from django.utils.timezone import now
from django.conf import settings
from hc.api.models import Check from hc.api.models import Check
from hc.test import BaseTestCase from hc.test import BaseTestCase
@ -47,7 +48,7 @@ class ListChecksTestCase(BaseTestCase):
self.assertEqual(checks["Alice 1"]["last_ping"], self.now.isoformat()) self.assertEqual(checks["Alice 1"]["last_ping"], self.now.isoformat())
self.assertEqual(checks["Alice 1"]["n_pings"], 1) self.assertEqual(checks["Alice 1"]["n_pings"], 1)
self.assertEqual(checks["Alice 1"]["status"], "new") self.assertEqual(checks["Alice 1"]["status"], "new")
pause_url = "http://localhost:8000/api/v1/checks/%s/pause" % self.a1.code
pause_url = "{0}/api/v1/checks/%s/pause".format(getattr(settings, "SITE_ROOT")) % self.a1.code
self.assertEqual(checks["Alice 1"]["pause_url"], pause_url) self.assertEqual(checks["Alice 1"]["pause_url"], pause_url)
next_ping = self.now + td(seconds=3600) next_ping = self.now + td(seconds=3600)


+ 17
- 0
hc/front/templatetags/hc_extras.py View File

@ -1,4 +1,5 @@
from django import template from django import template
from django.conf import settings
register = template.Library() register = template.Library()
@ -9,6 +10,7 @@ class Unit(object):
self.plural = name + "s" self.plural = name + "s"
self.nsecs = nsecs self.nsecs = nsecs
MINUTE = Unit("minute", 60) MINUTE = Unit("minute", 60)
HOUR = Unit("hour", MINUTE.nsecs * 60) HOUR = Unit("hour", MINUTE.nsecs * 60)
DAY = Unit("day", HOUR.nsecs * 24) DAY = Unit("day", HOUR.nsecs * 24)
@ -32,3 +34,18 @@ def hc_duration(td):
result.append("%d %s" % (v, unit.plural)) result.append("%d %s" % (v, unit.plural))
return " ".join(result) return " ".join(result)
@register.simple_tag
def settings_value(name):
return getattr(settings, name, "")
@register.simple_tag
def site_name():
return settings.SITE_NAME
@register.simple_tag
def site_root():
return settings.SITE_ROOT

+ 1
- 0
hc/settings.py View File

@ -121,6 +121,7 @@ USE_L10N = True
USE_TZ = True USE_TZ = True
SITE_ROOT = "http://localhost:8000" SITE_ROOT = "http://localhost:8000"
SITE_NAME = "healthchecks.io"
PING_ENDPOINT = SITE_ROOT + "/ping/" PING_ENDPOINT = SITE_ROOT + "/ping/"
PING_EMAIL_DOMAIN = HOST PING_EMAIL_DOMAIN = HOST
STATIC_URL = '/static/' STATIC_URL = '/static/'


+ 5
- 4
templates/accounts/check_token_submit.html View File

@ -1,8 +1,9 @@
{% load hc_extras %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Continue to healthchecks.io</title>
<title>Continue to {% site_name %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
</head> </head>
<body> <body>
@ -41,7 +42,7 @@
</style> </style>
<noscript> <noscript>
<p>You are about to log into healthchecks.io.</p>
<p>You are about to log into {% site_name %}.</p>
<p>Please press the button below to continue:</p> <p>Please press the button below to continue:</p>
<br /> <br />
<form id="form" method="post"> <form id="form" method="post">
@ -50,9 +51,9 @@
id="submit-btn" id="submit-btn"
type="submit" type="submit"
class="btn btn-lg btn-primary" class="btn btn-lg btn-primary"
value="Continue to healthchecks.io">
value="Continue to {% site_name %}">
</form> </form>
</noscript> </noscript>
</body> </body>
</html>
</html>

+ 4
- 4
templates/accounts/profile.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress staticfiles %}
{% load compress staticfiles hc_extras %}
{% block title %}Account Settings - healthchecks.io{% endblock %}
{% block title %}Account Settings - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -47,7 +47,7 @@
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
<h2>Set Password</h2> <h2>Set Password</h2>
Attach a password to your healthchecks.io account
Attach a password to your {% site_name %} account
<button <button
type="submit" type="submit"
name="set_password" name="set_password"
@ -324,4 +324,4 @@
<script src="{% static 'js/bootstrap.min.js' %}"></script> <script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/profile.js' %}"></script> <script src="{% static 'js/profile.js' %}"></script>
{% endcompress %} {% endcompress %}
{% endblock %}
{% endblock %}

+ 3
- 2
templates/accounts/set_password.html View File

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load hc_extras %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
@ -7,7 +8,7 @@
<h1>Set a Password</h1> <h1>Set a Password</h1>
<div class="dialog-body"> <div class="dialog-body">
<p> <p>
Please pick a password for your healthchecks.io account.
Please pick a password for your {% site_name %} account.
</p> </p>
</div> </div>
@ -36,4 +37,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %}
{% endblock %}

+ 3
- 2
templates/base.html View File

@ -1,8 +1,9 @@
{% load hc_extras %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% block title %}healthchecks.io - Monitor Cron Jobs. Get Notified When Your Cron Jobs Fail{% endblock %}</title>
<title>{% block title %}{% site_name %} - Monitor Cron Jobs. Get Notified When Your Cron Jobs Fail{% endblock %}</title>
<meta name="description" content="Monitor and Get Notified When Your Cron Jobs Fail. Free alternative to Cronitor and Dead Man's Snitch."> <meta name="description" content="Monitor and Get Notified When Your Cron Jobs Fail. Free alternative to Cronitor and Dead Man's Snitch.">
<meta name="keywords" content="monitor cron jobs daemon background worker service cronjob monitoring crontab alert notify cronitor deadmanssnitch webhook"> <meta name="keywords" content="monitor cron jobs daemon background worker service cronjob monitoring crontab alert notify cronitor deadmanssnitch webhook">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -170,4 +171,4 @@
{% endcompress %} {% endcompress %}
{% endblock %} {% endblock %}
</body> </body>
</html>
</html>

+ 3
- 2
templates/base_bare.html View File

@ -1,8 +1,9 @@
{% load hc_extras %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% block title %}healthchecks.io - Monitor Cron Jobs. Get Notified When Your Cron Jobs Fail{% endblock %}</title>
<title>{% block title %}{% site_name %} - Monitor Cron Jobs. Get Notified When Your Cron Jobs Fail{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>
@ -22,4 +23,4 @@
</div> </div>
{% endblock %} {% endblock %}
</body> </body>
</html>
</html>

+ 2
- 1
templates/emails/alert-body-html.html View File

@ -1,9 +1,10 @@
{% extends "emails/base.html" %} {% extends "emails/base.html" %}
{% load hc_extras %}
{% block content %} {% block content %}
<h1>Hello,</h1> <h1>Hello,</h1>
<p> <p>
This is a notification sent by <a href="https://healthchecks.io">healthchecks.io</a>.
This is a notification sent by <a href="{% site_root %}">{% site_name %}</a>.
<br /> <br />
The check <strong>{{ check.name_then_code }}</strong> The check <strong>{{ check.name_then_code }}</strong>
has gone <strong>{{ check.status|upper }}</strong>. has gone <strong>{{ check.status|upper }}</strong>.


+ 3
- 2
templates/emails/alert-body-text.html View File

@ -1,6 +1,7 @@
{% load hc_extras %}
Hello, Hello,
This is a notification sent by healthchecks.io.
This is a notification sent by {% site_name %}.
The check "{{ check.name_then_code }}" has gone {{ check.status }}. The check "{{ check.name_then_code }}" has gone {{ check.status }}.
Here is a summary of all your checks: Here is a summary of all your checks:
@ -9,5 +10,5 @@ Here is a summary of all your checks:
-- --
Regards, Regards,
healthchecks.io
{% site_name %}

+ 3
- 2
templates/emails/base.html View File

@ -1,3 +1,4 @@
{% load hc_extras %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
@ -184,7 +185,7 @@
<!-- Logo --> <!-- Logo -->
<tr> <tr>
<td class="email-masthead"> <td class="email-masthead">
<img src="{{ SITE_ROOT }}/static/img/logo-full.png" alt="" />
<img src="{% site_root %}/static/img/logo-full.png" alt="" />
</td> </td>
</tr> </tr>
<!-- Email Body --> <!-- Email Body -->
@ -218,4 +219,4 @@
</tr> </tr>
</table> </table>
</body> </body>
</html>
</html>

+ 5
- 4
templates/emails/login-body-html.html View File

@ -1,11 +1,12 @@
{% extends "emails/base.html" %} {% extends "emails/base.html" %}
{% load hc_extras %}
{% block content %} {% block content %}
<h1>Hello,</h1> <h1>Hello,</h1>
{% if inviting_profile %} {% if inviting_profile %}
<p><strong>{{ inviting_profile }}</strong> invites you to their <p><strong>{{ inviting_profile }}</strong> invites you to their
<a href="https://healthchecks.io">healthchecks.io</a> account.</p>
<a href="{% site_root %}">{% site_name %}</a> account.</p>
<p>You will be able to manage their <p>You will be able to manage their
existing monitoring checks and set up new ones. If you already have your existing monitoring checks and set up new ones. If you already have your
@ -14,7 +15,7 @@
accounts.</p> accounts.</p>
{% endif %} {% endif %}
<p>To log into <a href="https://healthchecks.io">healthchecks.io</a>, please press the button below:</p>
<p>To log into <a href="{% site_root %}">{% site_name %}</a>, please press the button below:</p>
<!-- Action --> <!-- Action -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0"> <table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0">
@ -34,7 +35,7 @@
<p>Thanks,<br>The Healthchecks<span>.</span>io</a> Team</p> <p>Thanks,<br>The Healthchecks<span>.</span>io</a> Team</p>
<p> <p>
<strong>P.S.</strong> Need help getting started? Check out our <strong>P.S.</strong> Need help getting started? Check out our
<a href="https://healthchecks.io/docs/">help documentation</a>.
<a href="{% site_root %}/docs/">help documentation</a>.
Or, just reply to this email with any questions or issues you have. Or, just reply to this email with any questions or issues you have.
</p> </p>
<!-- Sub copy --> <!-- Sub copy -->
@ -47,4 +48,4 @@
</td> </td>
</tr> </tr>
</table> </table>
{% endblock %}
{% endblock %}

+ 7
- 6
templates/emails/login-body-text.html View File

@ -1,18 +1,19 @@
{% load hc_extras %}
{% block content %}Hello, {% block content %}Hello,
{% if inviting_profile %} {% if inviting_profile %}
{{ inviting_profile }} invites you to their healthchecks.io account.
{{ inviting_profile }} invites you to their {% site_name %} account.
You will be able to manage their existing monitoring checks and set up new You will be able to manage their existing monitoring checks and set up new
ones. If you already have your own account on healthchecks.io, you will
ones. If you already have your own account on {% site_name %}, you will
be able to switch between the two accounts.{% endif %} be able to switch between the two accounts.{% endif %}
To log into healthchecks.io, please open the link below:
To log into {% site_name %}, please open the link below:
{{ login_link }} {{ login_link }}
Thanks, Thanks,
The Healthchecks.io Team
The {% site_name %} Team
P.S. Need help getting started? Check out our help documentation P.S. Need help getting started? Check out our help documentation
at https://healthchecks.io/docs/
at {% site_root %}/docs/
Or, just reply to this email with any questions or issues you have. Or, just reply to this email with any questions or issues you have.
{% endblock %}
{% endblock %}

+ 3
- 2
templates/emails/login-subject.html View File

@ -1,5 +1,6 @@
{% load hc_extras %}
{% if inviting_profile %} {% if inviting_profile %}
You have been invited to join {{ inviting_profile }} on healthchecks.io
You have been invited to join {{ inviting_profile }} on {% site_name %}
{% else %} {% else %}
Log in to healthchecks.io
Log in to {% site_name %}
{% endif %} {% endif %}

+ 1
- 1
templates/emails/report-body-html.html View File

@ -4,7 +4,7 @@
{% block content %} {% block content %}
<h1>Hello,</h1> <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="{% site_root %}">{% site_name %}</a>.</p>
{% include "emails/summary-html.html" %} {% include "emails/summary-html.html" %}


+ 3
- 2
templates/emails/report-body-text.html View File

@ -1,10 +1,11 @@
{% load hc_extras %}
Hello, Hello,
This is a monthly report sent by healthchecks.io.
This is a monthly report sent by {% site_name %}.
{% include 'emails/summary-text.html' %} {% include 'emails/summary-text.html' %}
-- --
Cheers, Cheers,
healthchecks.io
{% site_name %}

+ 3
- 2
templates/emails/set-password-body-html.html View File

@ -1,10 +1,11 @@
{% load hc_extras %}
<p>Hello,</p> <p>Hello,</p>
<p>Here's a link to set a password for your account on healthchecks.io:</p>
<p>Here's a link to set a password for your account on {% site_name %}:</p>
<p><a href="{{ set_password_link }}">{{ set_password_link }}</a></p> <p><a href="{{ set_password_link }}">{{ set_password_link }}</a></p>
<p> <p>
--<br /> --<br />
Regards,<br /> Regards,<br />
healthchecks.io
{% site_name %}
</p> </p>

+ 3
- 2
templates/emails/set-password-body-text.html View File

@ -1,10 +1,11 @@
{% load hc_extras %}
Hello, Hello,
Here's a link to set a password for your account on healthchecks.io:
Here's a link to set a password for your account on {% site_name %}:
{{ set_password_link }} {{ set_password_link }}
-- --
Regards, Regards,
healthchecks.io
{% site_name %}

+ 2
- 1
templates/emails/set-password-subject.html View File

@ -1 +1,2 @@
Set password on healthchecks.io
{% load hc_extras %}
Set password on {% site_name %}

+ 3
- 2
templates/emails/verify-email-body-html.html View File

@ -1,11 +1,12 @@
{% load hc_extras %}
<p>Hello,</p> <p>Hello,</p>
<p>To start receiving healthchecks.io notification to this address,
<p>To start receiving {% site_name %} notification to this address,
please click the link below:</p> please click the link below:</p>
<p><a href="{{ verify_link }}">{{ verify_link }}</a></p> <p><a href="{{ verify_link }}">{{ verify_link }}</a></p>
<p> <p>
--<br /> --<br />
Regards,<br /> Regards,<br />
healthchecks.io
{% site_name %}
</p> </p>

+ 3
- 2
templates/emails/verify-email-body-text.html View File

@ -1,10 +1,11 @@
{% load hc_extras %}
Hello, Hello,
To start receiving healthchecks.io notification to this address,
To start receiving {% site_name %} notification to this address,
please follow the link below: please follow the link below:
{{ verify_link }} {{ verify_link }}
-- --
Regards, Regards,
healthchecks.io
{% site_name %}

+ 2
- 1
templates/emails/verify-email-subject.html View File

@ -1 +1,2 @@
Verify email address on healthchecks.io
{% load hc_extras %}
Verify email address on {% site_name %}

+ 1
- 1
templates/front/channels.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Integrations - healthchecks.io{% endblock %}
{% block title %}Integrations - {% site_name %}{% endblock %}
{% block content %} {% block content %}


+ 8
- 8
templates/front/docs.html View File

@ -1,7 +1,7 @@
{% extends "front/base_docs.html" %} {% extends "front/base_docs.html" %}
{% load staticfiles %}
{% load staticfiles hc_extras %}
{% block title %}Documentation - healthchecks.io{% endblock %}
{% block title %}Documentation - {% site_name %}{% endblock %}
{% block docs_content %} {% block docs_content %}
@ -12,7 +12,7 @@ page has an unique "ping" URL. Whenever you access this URL,
the "Last Ping" value of corresponding check is updated. the "Last Ping" value of corresponding check is updated.
</p> </p>
<p>When a certain amount of time passes since last received ping, the <p>When a certain amount of time passes since last received ping, the
check is considered "late", and healthchecks.io sends an email alert.
check is considered "late", and {% site_name %} sends an email alert.
It is a simple idea.</p> It is a simple idea.</p>
<h2>Executing a Ping</h2> <h2>Executing a Ping</h2>
@ -128,7 +128,7 @@ thing: they fire off a HTTP GET method.</p>
<a name="browser"></a> <a name="browser"></a>
<h3>Browser</h3> <h3>Browser</h3>
<p> <p>
healthchecks.io includes <code>Access-Control-Allow-Origin:*</code>
{% site_name %} includes <code>Access-Control-Allow-Origin:*</code>
CORS header in its ping responses, so cross-domain AJAX requests CORS header in its ping responses, so cross-domain AJAX requests
should work. should work.
</p> </p>
@ -139,9 +139,9 @@ thing: they fire off a HTTP GET method.</p>
<p> <p>
You can use <a href="https://msdn.microsoft.com/en-us/powershell/mt173057.aspx">PowerShell</a> You can use <a href="https://msdn.microsoft.com/en-us/powershell/mt173057.aspx">PowerShell</a>
and Windows Task Scheduler to automate various tasks on a Windows system. and Windows Task Scheduler to automate various tasks on a Windows system.
From within a PowerShell script it is also easy to ping healthchecks.io.
From within a PowerShell script it is also easy to ping {% site_name %}.
</p> </p>
<p>Here is a simple PowerShell script that pings healthchecks.io.
<p>Here is a simple PowerShell script that pings {% site_name %}.
When scheduled to run with Task Scheduler, it will essentially When scheduled to run with Task Scheduler, it will essentially
just send regular "I'm alive" messages. You can of course extend it to just send regular "I'm alive" messages. You can of course extend it to
do more things.</p> do more things.</p>
@ -240,10 +240,10 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
<td> <td>
<strong>Down.</strong> <strong>Down.</strong>
Time since last ping has exceeded <strong>Period</strong> + <strong>Grace</strong>. Time since last ping has exceeded <strong>Period</strong> + <strong>Grace</strong>.
When check goes from "Late" to "Down", healthchecks.io
When check goes from "Late" to "Down", {% site_name %}
sends you an alert. sends you an alert.
</td> </td>
</tr> </tr>
</table> </table>
{% endblock %}
{% endblock %}

+ 5
- 5
templates/front/docs_api.html View File

@ -1,7 +1,7 @@
{% extends "front/base_docs.html" %} {% extends "front/base_docs.html" %}
{% load staticfiles %}
{% load staticfiles hc_extras %}
{% block title %}REST API - healthchecks.io{% endblock %}
{% block title %}REST API - {% site_name %}{% endblock %}
{% block docs_content %} {% block docs_content %}
@ -17,7 +17,7 @@ This is early days for healtchecks.io REST API. For now, there's API calls to:
<h2 class="rule">Authentication</h2> <h2 class="rule">Authentication</h2>
<p>Your requests to healtchecks.io REST API must authenticate using an <p>Your requests to healtchecks.io REST API must authenticate using an
API key. By default, an user account on healthchecks.io doesn't have
API key. By default, an user account on {% site_name %} doesn't have
an API key. You can create one in the <a href="{% url 'hc-profile' %}">Settings</a> page. an API key. You can create one in the <a href="{% url 'hc-profile' %}">Settings</a> page.
</p> </p>
@ -34,7 +34,7 @@ its value should be your API key.
<h2 class="rule">API Requests</h2> <h2 class="rule">API Requests</h2>
<p> <p>
For POST requests, the healthchecks.io API expects request body to be
For POST requests, the {% site_name %} API expects request body to be
a JSON document (<em>not</em> a <code>mulitpart/form-data</code> encoded a JSON document (<em>not</em> a <code>mulitpart/form-data</code> encoded
form data). form data).
</p> </p>
@ -42,7 +42,7 @@ form data).
<h2 class="rule">API Responses</h2> <h2 class="rule">API Responses</h2>
<p> <p>
healthchecks.io uses HTTP status codes wherever possible.
{% site_name %} uses HTTP status codes wherever possible.
In general, 2xx class indicates success, 4xx indicates an client error, In general, 2xx class indicates success, 4xx indicates an client error,
and 5xx indicates a server error. and 5xx indicates a server error.
</p> </p>


+ 2
- 2
templates/front/log.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}My Checks - healthchecks.io{% endblock %}
{% block title %}My Checks - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -114,4 +114,4 @@
<script src="{% static 'js/moment.min.js' %}"></script> <script src="{% static 'js/moment.min.js' %}"></script>
<script src="{% static 'js/log.js' %}"></script> <script src="{% static 'js/log.js' %}"></script>
{% endcompress %} {% endcompress %}
{% endblock %}
{% endblock %}

+ 2
- 2
templates/front/my_checks.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress staticfiles %}
{% load compress staticfiles hc_extras %}
{% block title %}My Checks - healthchecks.io{% endblock %}
{% block title %}My Checks - {% site_name %}{% endblock %}
{% block content %} {% block content %}


+ 2
- 1
templates/front/verify_email_success.html View File

@ -1,4 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load hc_extras %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
@ -9,7 +10,7 @@
<p> <p>
Success! You've verified this email Success! You've verified this email
address, and it will now receive address, and it will now receive
healthchecks.io notifications.
{% site_name %} notifications.
</p> </p>
</div> </div>
</div> </div>


+ 2
- 2
templates/integrations/add_email.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Notification Channels - healthchecks.io{% endblock %}
{% block title %}Notification Channels - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -18,7 +18,7 @@
<p> <p>
<strong>Confirmation needed.</strong> <strong>Confirmation needed.</strong>
After entering an email address, healthchecks.io will send out a confirmation link.
After entering an email address, {% site_name %} will send out a confirmation link.
Only confirmed addresses will receive notifications. Only confirmed addresses will receive notifications.
</p> </p>


+ 2
- 2
templates/integrations/add_hipchat.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Notification Channels - healthchecks.io{% endblock %}
{% block title %}Notification Channels - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -10,7 +10,7 @@
<h1>HipChat</h1> <h1>HipChat</h1>
<p>If your team uses <a href="https://www.hipchat.com/">HipChat</a>, <p>If your team uses <a href="https://www.hipchat.com/">HipChat</a>,
you can set up healthchecks.io to post status updates directly to an
you can set up {% site_name %} to post status updates directly to an
appropriate HipChat room.</p> appropriate HipChat room.</p>
<h2>Setup Guide</h2> <h2>Setup Guide</h2>


+ 2
- 2
templates/integrations/add_pd.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Add PagerDuty - healthchecks.io{% endblock %}
{% block title %}Add PagerDuty - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -13,7 +13,7 @@
a well-known incident management system. It provides a well-known incident management system. It provides
alerting, on-call scheduling, escalation policies and incident tracking. alerting, on-call scheduling, escalation policies and incident tracking.
If you use or plan on using PagerDuty, you can can integrate it If you use or plan on using PagerDuty, you can can integrate it
with your healthchecks.io account in few simple steps.</p>
with your {% site_name %} account in few simple steps.</p>
<h2>Setup Guide</h2> <h2>Setup Guide</h2>
<div class="row ai-step"> <div class="row ai-step">


+ 2
- 2
templates/integrations/add_pushbullet.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Add Pushbullet - healthchecks.io{% endblock %}
{% block title %}Add Pushbullet - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -11,7 +11,7 @@
<div class="jumbotron"> <div class="jumbotron">
<p> <p>
With this integration, healthchecks.io will send
With this integration, {% site_name %} will send
a <a href="http://pushbullet.com/">Pushbullet</a> a <a href="http://pushbullet.com/">Pushbullet</a>
notification when a check notification when a check
goes <strong>up</strong> or <strong>down</strong>. goes <strong>up</strong> or <strong>down</strong>.


+ 2
- 2
templates/integrations/add_pushover.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Add Pushover - healthchecks.io{% endblock %}
{% block title %}Add Pushover - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -12,7 +12,7 @@
<p><a href="https://www.pushover.net/">Pushover</a> is a service to receive <p><a href="https://www.pushover.net/">Pushover</a> is a service to receive
instant push notifications on your phone or tablet from a variety of instant push notifications on your phone or tablet from a variety of
sources. If you bought the app on your mobile device, you can integrate it sources. If you bought the app on your mobile device, you can integrate it
with your healthchecks.io account in a few simple steps.</p>
with your {% site_name %} account in a few simple steps.</p>
<h2>Integration Settings</h2> <h2>Integration Settings</h2>


+ 5
- 5
templates/integrations/add_slack.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Add Slack - healthchecks.io{% endblock %}
{% block title %}Add Slack - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -12,7 +12,7 @@
<div class="jumbotron"> <div class="jumbotron">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<p>If your team uses <a href="http://slack.com/">Slack</a>, you can set <p>If your team uses <a href="http://slack.com/">Slack</a>, you can set
up healthchecks.io to post status updates directly to an appropriate
up {% site_name %} to post status updates directly to an appropriate
Slack channel.</p> Slack channel.</p>
<div class="text-center"> <div class="text-center">
@ -27,7 +27,7 @@
<a href="https://github.com/healthchecks/healthchecks">open source</a> <a href="https://github.com/healthchecks/healthchecks">open source</a>
service for monitoring your cron jobs, background processes and service for monitoring your cron jobs, background processes and
scheduled tasks. Before adding Slack integration, please log into scheduled tasks. Before adding Slack integration, please log into
healthchecks.io:</p>
{% site_root %}:</p>
<div class="text-center"> <div class="text-center">
<form class="form-inline" action="{% url 'hc-login' %}" method="post"> <form class="form-inline" action="{% url 'hc-login' %}" method="post">
@ -97,7 +97,7 @@
<span class="step-no">4</span> <span class="step-no">4</span>
<p> <p>
That is all! You will now be redirected back to That is all! You will now be redirected back to
"Integrations" page on healthchecks.io and see
"Integrations" page on {% site_name %} and see
the new integration! the new integration!
</p> </p>
</div> </div>
@ -112,7 +112,7 @@
<h1>Slack</h1> <h1>Slack</h1>
<p>If your team uses <a href="http://slack.com/">Slack</a>, you can set <p>If your team uses <a href="http://slack.com/">Slack</a>, you can set
up healthchecks.io to post status updates directly to an appropriate
up {% site_name %} to post status updates directly to an appropriate
Slack channel.</p> Slack channel.</p>
<h2>Setup Guide</h2> <h2>Setup Guide</h2>


+ 4
- 4
templates/integrations/add_victorops.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Add VictorOps - healthchecks.io{% endblock %}
{% block title %}Add VictorOps - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -11,8 +11,8 @@
<p><a href="https://victorops.com/">VictorOps</a> is <p><a href="https://victorops.com/">VictorOps</a> is
another incident management system similar to PagerDuty. another incident management system similar to PagerDuty.
If you use or plan on using VitorOps, you can can integrate it
with your healthchecks.io account in few simple steps.</p>
If you use or plan on using VictorOps, you can can integrate it
with your {% site_name %} account in few simple steps.</p>
<h2>Setup Guide</h2> <h2>Setup Guide</h2>
<div class="row ai-step"> <div class="row ai-step">
@ -22,7 +22,7 @@
Log into your VictorOps account, Log into your VictorOps account,
go to <strong>Settings > Schedules</strong>, go to <strong>Settings > Schedules</strong>,
and find or create the Team Schedule you and find or create the Team Schedule you
would like to use for healthchecks.io alerts.
would like to use for {% site_name %} alerts.
</p> </p>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">


+ 2
- 2
templates/integrations/add_webhook.html View File

@ -1,7 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %} {% load compress humanize staticfiles hc_extras %}
{% block title %}Add Webhook - healthchecks.io{% endblock %}
{% block title %}Add Webhook - {% site_name %}{% endblock %}
{% block content %} {% block content %}
@ -40,7 +40,7 @@
<pre>http://requestb.in/1hhct291?message=<strong>$NAME</strong>:<strong>$STATUS</strong></pre> <pre>http://requestb.in/1hhct291?message=<strong>$NAME</strong>:<strong>$STATUS</strong></pre>
<p> <p>
After encoding and replacing the variables, healthchecks.io would then call:
After encoding and replacing the variables, {% site_name %} would then call:
</p> </p>
<pre>http://requestb.in/1hhct291?message=<strong>My%20Check</strong>:<strong>down</strong></pre> <pre>http://requestb.in/1hhct291?message=<strong>My%20Check</strong>:<strong>down</strong></pre>


+ 2
- 2
templates/integrations/slack_message.json View File

@ -1,7 +1,7 @@
{% load hc_extras humanize %} {% load hc_extras humanize %}
{ {
"username": "healthchecks.io",
"icon_url": "https://healthchecks.io/static/img/[email protected]",
"username": "{% site_name %}",
"icon_url": "{% site_root %}/static/img/[email protected]",
"attachments": [{ "attachments": [{
{% if check.status == "up" %} {% if check.status == "up" %}
"color": "good", "color": "good",


+ 1
- 1
templates/payments/billing.html View File

@ -50,4 +50,4 @@
{% endfor%} {% endfor%}
</table> </table>
{% endblock %}
{% endblock %}

+ 1
- 1
templates/payments/invoice.html View File

@ -59,4 +59,4 @@ VAT: LV44103100701
If you have a credit card on file it will be automatically charged within 24 hours. If you have a credit card on file it will be automatically charged within 24 hours.
</p> </p>
{% endblock %}
{% endblock %}

Loading…
Cancel
Save