Browse Source

made changes more concise

pull/86/head
James Moore 8 years ago
parent
commit
1ae07b2028
34 changed files with 78 additions and 70 deletions
  1. +8
    -0
      hc/front/templatetags/hc_extras.py
  2. +3
    -3
      templates/accounts/check_token_submit.html
  3. +2
    -2
      templates/accounts/profile.html
  4. +1
    -1
      templates/accounts/set_password.html
  5. +1
    -1
      templates/base.html
  6. +1
    -1
      templates/base_bare.html
  7. +1
    -1
      templates/emails/alert-body-html.html
  8. +2
    -2
      templates/emails/alert-body-text.html
  9. +3
    -3
      templates/emails/login-body-html.html
  10. +5
    -5
      templates/emails/login-body-text.html
  11. +2
    -2
      templates/emails/login-subject.html
  12. +1
    -1
      templates/emails/report-body-html.html
  13. +2
    -2
      templates/emails/report-body-text.html
  14. +2
    -2
      templates/emails/set-password-body-html.html
  15. +2
    -2
      templates/emails/set-password-body-text.html
  16. +1
    -1
      templates/emails/set-password-subject.html
  17. +2
    -2
      templates/emails/verify-email-body-html.html
  18. +2
    -2
      templates/emails/verify-email-body-text.html
  19. +1
    -1
      templates/emails/verify-email-subject.html
  20. +1
    -1
      templates/front/channels.html
  21. +6
    -6
      templates/front/docs.html
  22. +4
    -4
      templates/front/docs_api.html
  23. +1
    -1
      templates/front/log.html
  24. +1
    -1
      templates/front/my_checks.html
  25. +1
    -1
      templates/front/verify_email_success.html
  26. +2
    -2
      templates/integrations/add_email.html
  27. +2
    -2
      templates/integrations/add_hipchat.html
  28. +2
    -2
      templates/integrations/add_pd.html
  29. +2
    -2
      templates/integrations/add_pushbullet.html
  30. +2
    -2
      templates/integrations/add_pushover.html
  31. +5
    -5
      templates/integrations/add_slack.html
  32. +3
    -3
      templates/integrations/add_victorops.html
  33. +2
    -2
      templates/integrations/add_webhook.html
  34. +2
    -2
      templates/integrations/slack_message.json

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

@ -39,3 +39,11 @@ def hc_duration(td):
@register.simple_tag
def settings_value(name):
return getattr(settings, name, "")
def site_name(name):
return settings.SITE_NAME
def site_root(name):
return settings.SITE_ROOT

+ 3
- 3
templates/accounts/check_token_submit.html View File

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


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

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load compress staticfiles hc_extras %}
{% block title %}Account Settings - {% settings_value "SITE_NAME" %}{% endblock %}
{% block title %}Account Settings - {% site_name %}{% endblock %}
{% block content %}
@ -47,7 +47,7 @@
<form method="post">
{% csrf_token %}
<h2>Set Password</h2>
Attach a password to your {% settings_value "SITE_NAME" %} account
Attach a password to your {% site_name %} account
<button
type="submit"
name="set_password"


+ 1
- 1
templates/accounts/set_password.html View File

@ -8,7 +8,7 @@
<h1>Set a Password</h1>
<div class="dialog-body">
<p>
Please pick a password for your {% settings_value "SITE_NAME" %} account.
Please pick a password for your {% site_name %} account.
</p>
</div>


+ 1
- 1
templates/base.html View File

@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% block title %}{% settings_value "SITE_NAME" %} - 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="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">


+ 1
- 1
templates/base_bare.html View File

@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% block title %}{% settings_value "SITE_NAME" %} - 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">
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>


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

@ -4,7 +4,7 @@
<h1>Hello,</h1>
<p>
This is a notification sent by <a href="{% settings_value "SITE_ROOT" %}">{% settings_value "SITE_NAME" %}</a>.
This is a notification sent by <a href="{% site_root %}">{% site_name %}</a>.
<br />
The check <strong>{{ check.name_then_code }}</strong>
has gone <strong>{{ check.status|upper }}</strong>.


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

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

+ 3
- 3
templates/emails/login-body-html.html View File

@ -6,7 +6,7 @@
{% if inviting_profile %}
<p><strong>{{ inviting_profile }}</strong> invites you to their
<a href="{% settings_value "SITE_ROOT" %}">{% settings_value "SITE_NAME" %}</a> account.</p>
<a href="{% site_root %}">{% site_name %}</a> account.</p>
<p>You will be able to manage their
existing monitoring checks and set up new ones. If you already have your
@ -15,7 +15,7 @@
accounts.</p>
{% endif %}
<p>To log into <a href="{% settings_value "SITE_ROOT" %}">{% settings_value "SITE_NAME" %}</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 -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0">
@ -35,7 +35,7 @@
<p>Thanks,<br>The Healthchecks<span>.</span>io</a> Team</p>
<p>
<strong>P.S.</strong> Need help getting started? Check out our
<a href="{% settings_value "SITE_ROOT" %}/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.
</p>
<!-- Sub copy -->


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

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

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

@ -1,6 +1,6 @@
{% load hc_extras %}
{% if inviting_profile %}
You have been invited to join {{ inviting_profile }} on {% settings_value "SITE_NAME" %}
You have been invited to join {{ inviting_profile }} on {% site_name %}
{% else %}
Log in to {% settings_value "SITE_NAME" %}
Log in to {% site_name %}
{% endif %}

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

@ -4,7 +4,7 @@
{% block content %}
<h1>Hello,</h1>
<p>This is a monthly report sent by <a href="{% settings_value "SITE_ROOT" %}">{% settings_value "SITE_NAME" %}</a>.</p>
<p>This is a monthly report sent by <a href="{% site_root %}">{% site_name %}</a>.</p>
{% include "emails/summary-html.html" %}


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

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

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

@ -1,11 +1,11 @@
{% load hc_extras %}
<p>Hello,</p>
<p>Here's a link to set a password for your account on {% settings_value "SITE_NAME" %}:</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>
--<br />
Regards,<br />
{% settings_value "SITE_NAME" %}
{% site_name %}
</p>

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

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

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

@ -1,2 +1,2 @@
{% load hc_extras %}
Set password on {% settings_value "SITE_NAME" %}
Set password on {% site_name %}

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

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

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

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

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

@ -1,2 +1,2 @@
{% load hc_extras %}
Verify email address on {% settings_value "SITE_NAME" %}
Verify email address on {% site_name %}

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

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


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

@ -1,7 +1,7 @@
{% extends "front/base_docs.html" %}
{% load staticfiles %}
{% block title %}Documentation - {% settings_value "SITE_NAME" %}{% endblock %}
{% block title %}Documentation - {% site_name %}{% endblock %}
{% 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.
</p>
<p>When a certain amount of time passes since last received ping, the
check is considered "late", and {% settings_value "SITE_NAME" %} sends an email alert.
check is considered "late", and {% site_name %} sends an email alert.
It is a simple idea.</p>
<h2>Executing a Ping</h2>
@ -128,7 +128,7 @@ thing: they fire off a HTTP GET method.</p>
<a name="browser"></a>
<h3>Browser</h3>
<p>
{% settings_value "SITE_NAME" %} 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
should work.
</p>
@ -139,9 +139,9 @@ thing: they fire off a HTTP GET method.</p>
<p>
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.
From within a PowerShell script it is also easy to ping {% settings_value "SITE_NAME" %}.
From within a PowerShell script it is also easy to ping {% site_name %}.
</p>
<p>Here is a simple PowerShell script that pings {% settings_value "SITE_NAME" %}.
<p>Here is a simple PowerShell script that pings {% site_name %}.
When scheduled to run with Task Scheduler, it will essentially
just send regular "I'm alive" messages. You can of course extend it to
do more things.</p>
@ -240,7 +240,7 @@ powershell.exe -ExecutionPolicy bypass -File C:\Scripts\healthchecks.ps1
<td>
<strong>Down.</strong>
Time since last ping has exceeded <strong>Period</strong> + <strong>Grace</strong>.
When check goes from "Late" to "Down", {% settings_value "SITE_NAME" %}
When check goes from "Late" to "Down", {% site_name %}
sends you an alert.
</td>
</tr>


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

@ -1,7 +1,7 @@
{% extends "front/base_docs.html" %}
{% load staticfiles %}
{% block title %}REST API - {% settings_value "SITE_NAME" %}{% endblock %}
{% block title %}REST API - {% site_name %}{% endblock %}
{% 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>
<p>Your requests to healtchecks.io REST API must authenticate using an
API key. By default, an user account on {% settings_value "SITE_NAME" %} 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.
</p>
@ -34,7 +34,7 @@ its value should be your API key.
<h2 class="rule">API Requests</h2>
<p>
For POST requests, the {% settings_value "SITE_NAME" %} 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
form data).
</p>
@ -42,7 +42,7 @@ form data).
<h2 class="rule">API Responses</h2>
<p>
{% settings_value "SITE_NAME" %} 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,
and 5xx indicates a server error.
</p>


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

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


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

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


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

@ -10,7 +10,7 @@
<p>
Success! You've verified this email
address, and it will now receive
{% settings_value "SITE_NAME" %} notifications.
{% site_name %} notifications.
</p>
</div>
</div>


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

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %}
{% block title %}Notification Channels - {% settings_value "SITE_NAME" %}{% endblock %}
{% block title %}Notification Channels - {% site_name %}{% endblock %}
{% block content %}
@ -18,7 +18,7 @@
<p>
<strong>Confirmation needed.</strong>
After entering an email address, {% settings_value "SITE_NAME" %} 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.
</p>


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

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


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

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


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

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


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

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %}
{% block title %}Add Pushover - {% settings_value "SITE_NAME" %}{% endblock %}
{% block title %}Add Pushover - {% site_name %}{% endblock %}
{% block content %}
@ -12,7 +12,7 @@
<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
sources. If you bought the app on your mobile device, you can integrate it
with your {% settings_value "SITE_NAME" %} account in a few simple steps.</p>
with your {% site_name %} account in a few simple steps.</p>
<h2>Integration Settings</h2>


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

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


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

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


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

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load compress humanize staticfiles hc_extras %}
{% block title %}Add Webhook - {% settings_value "SITE_NAME" %}{% endblock %}
{% block title %}Add Webhook - {% site_name %}{% endblock %}
{% block content %}
@ -40,7 +40,7 @@
<pre>http://requestb.in/1hhct291?message=<strong>$NAME</strong>:<strong>$STATUS</strong></pre>
<p>
After encoding and replacing the variables, {% settings_value "SITE_NAME" %} would then call:
After encoding and replacing the variables, {% site_name %} would then call:
</p>
<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 %}
{
"username": "{% settings_value "SITE_NAME" %}",
"icon_url": "{% settings_value "SITE_ROOT" %}/static/img/[email protected]",
"username": "{% site_name %}",
"icon_url": "{% site_root %}/static/img/[email protected]",
"attachments": [{
{% if check.status == "up" %}
"color": "good",


Loading…
Cancel
Save