diff --git a/hc/front/templatetags/hc_extras.py b/hc/front/templatetags/hc_extras.py index e5fcc99e..19c9a652 100644 --- a/hc/front/templatetags/hc_extras.py +++ b/hc/front/templatetags/hc_extras.py @@ -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 diff --git a/templates/accounts/check_token_submit.html b/templates/accounts/check_token_submit.html index 009a13b7..fc8ae5ef 100644 --- a/templates/accounts/check_token_submit.html +++ b/templates/accounts/check_token_submit.html @@ -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> diff --git a/templates/accounts/profile.html b/templates/accounts/profile.html index 84edfa04..31f2694d 100644 --- a/templates/accounts/profile.html +++ b/templates/accounts/profile.html @@ -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" diff --git a/templates/accounts/set_password.html b/templates/accounts/set_password.html index 9a855053..9d925dda 100644 --- a/templates/accounts/set_password.html +++ b/templates/accounts/set_password.html @@ -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> diff --git a/templates/base.html b/templates/base.html index aea3f580..1d53c866 100644 --- a/templates/base.html +++ b/templates/base.html @@ -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"> diff --git a/templates/base_bare.html b/templates/base_bare.html index f8e01fda..98172e51 100644 --- a/templates/base_bare.html +++ b/templates/base_bare.html @@ -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'> diff --git a/templates/emails/alert-body-html.html b/templates/emails/alert-body-html.html index 559d7f9f..6c9b9a37 100644 --- a/templates/emails/alert-body-html.html +++ b/templates/emails/alert-body-html.html @@ -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>. diff --git a/templates/emails/alert-body-text.html b/templates/emails/alert-body-text.html index 815d47e9..16fe7a14 100644 --- a/templates/emails/alert-body-text.html +++ b/templates/emails/alert-body-text.html @@ -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 %} diff --git a/templates/emails/login-body-html.html b/templates/emails/login-body-html.html index 176c2132..fba5a08f 100644 --- a/templates/emails/login-body-html.html +++ b/templates/emails/login-body-html.html @@ -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 --> diff --git a/templates/emails/login-body-text.html b/templates/emails/login-body-text.html index 7158bcb5..24dc49cd 100644 --- a/templates/emails/login-body-text.html +++ b/templates/emails/login-body-text.html @@ -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 %} diff --git a/templates/emails/login-subject.html b/templates/emails/login-subject.html index 6f19691e..5b5940c0 100644 --- a/templates/emails/login-subject.html +++ b/templates/emails/login-subject.html @@ -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 %} diff --git a/templates/emails/report-body-html.html b/templates/emails/report-body-html.html index dca5ebc0..f7bc118d 100644 --- a/templates/emails/report-body-html.html +++ b/templates/emails/report-body-html.html @@ -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" %} diff --git a/templates/emails/report-body-text.html b/templates/emails/report-body-text.html index 48d67b63..db51f1d8 100644 --- a/templates/emails/report-body-text.html +++ b/templates/emails/report-body-text.html @@ -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 %} diff --git a/templates/emails/set-password-body-html.html b/templates/emails/set-password-body-html.html index 9975ace3..ef754add 100644 --- a/templates/emails/set-password-body-html.html +++ b/templates/emails/set-password-body-html.html @@ -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> diff --git a/templates/emails/set-password-body-text.html b/templates/emails/set-password-body-text.html index a0aebdf1..fc7ea72b 100644 --- a/templates/emails/set-password-body-text.html +++ b/templates/emails/set-password-body-text.html @@ -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 %} diff --git a/templates/emails/set-password-subject.html b/templates/emails/set-password-subject.html index c920def6..db5267fb 100644 --- a/templates/emails/set-password-subject.html +++ b/templates/emails/set-password-subject.html @@ -1,2 +1,2 @@ {% load hc_extras %} -Set password on {% settings_value "SITE_NAME" %} +Set password on {% site_name %} diff --git a/templates/emails/verify-email-body-html.html b/templates/emails/verify-email-body-html.html index 3cd97d2e..b4d13785 100644 --- a/templates/emails/verify-email-body-html.html +++ b/templates/emails/verify-email-body-html.html @@ -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> diff --git a/templates/emails/verify-email-body-text.html b/templates/emails/verify-email-body-text.html index 04f72187..f47167bf 100644 --- a/templates/emails/verify-email-body-text.html +++ b/templates/emails/verify-email-body-text.html @@ -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 %} diff --git a/templates/emails/verify-email-subject.html b/templates/emails/verify-email-subject.html index 93b7d49b..70442948 100644 --- a/templates/emails/verify-email-subject.html +++ b/templates/emails/verify-email-subject.html @@ -1,2 +1,2 @@ {% load hc_extras %} -Verify email address on {% settings_value "SITE_NAME" %} +Verify email address on {% site_name %} diff --git a/templates/front/channels.html b/templates/front/channels.html index 46e7aec5..9f5bb85c 100644 --- a/templates/front/channels.html +++ b/templates/front/channels.html @@ -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 %} diff --git a/templates/front/docs.html b/templates/front/docs.html index b3d2b495..144bdb77 100644 --- a/templates/front/docs.html +++ b/templates/front/docs.html @@ -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> diff --git a/templates/front/docs_api.html b/templates/front/docs_api.html index 0db87fdb..2df52045 100644 --- a/templates/front/docs_api.html +++ b/templates/front/docs_api.html @@ -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> diff --git a/templates/front/log.html b/templates/front/log.html index 0ac19db1..fe100d69 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -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 %} diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index 07087fd0..75a86ad8 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -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 %} diff --git a/templates/front/verify_email_success.html b/templates/front/verify_email_success.html index 11b917e2..e566a0e2 100644 --- a/templates/front/verify_email_success.html +++ b/templates/front/verify_email_success.html @@ -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> diff --git a/templates/integrations/add_email.html b/templates/integrations/add_email.html index b8ad5472..5da69e3b 100644 --- a/templates/integrations/add_email.html +++ b/templates/integrations/add_email.html @@ -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> diff --git a/templates/integrations/add_hipchat.html b/templates/integrations/add_hipchat.html index 2d21cfab..d0a2b8d3 100644 --- a/templates/integrations/add_hipchat.html +++ b/templates/integrations/add_hipchat.html @@ -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> diff --git a/templates/integrations/add_pd.html b/templates/integrations/add_pd.html index 8ef65cae..62eb172d 100644 --- a/templates/integrations/add_pd.html +++ b/templates/integrations/add_pd.html @@ -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"> diff --git a/templates/integrations/add_pushbullet.html b/templates/integrations/add_pushbullet.html index 1dd08ad7..b36afbd8 100644 --- a/templates/integrations/add_pushbullet.html +++ b/templates/integrations/add_pushbullet.html @@ -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>. diff --git a/templates/integrations/add_pushover.html b/templates/integrations/add_pushover.html index 4136c9e3..56ba3f65 100644 --- a/templates/integrations/add_pushover.html +++ b/templates/integrations/add_pushover.html @@ -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> diff --git a/templates/integrations/add_slack.html b/templates/integrations/add_slack.html index 42cdfad5..e7d48ba2 100644 --- a/templates/integrations/add_slack.html +++ b/templates/integrations/add_slack.html @@ -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> diff --git a/templates/integrations/add_victorops.html b/templates/integrations/add_victorops.html index 5f207d26..460df783 100644 --- a/templates/integrations/add_victorops.html +++ b/templates/integrations/add_victorops.html @@ -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"> diff --git a/templates/integrations/add_webhook.html b/templates/integrations/add_webhook.html index c2375a04..a9927f90 100644 --- a/templates/integrations/add_webhook.html +++ b/templates/integrations/add_webhook.html @@ -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> diff --git a/templates/integrations/slack_message.json b/templates/integrations/slack_message.json index 40c3e316..6f5a0c3e 100644 --- a/templates/integrations/slack_message.json +++ b/templates/integrations/slack_message.json @@ -1,7 +1,7 @@ {% load hc_extras humanize %} { - "username": "{% settings_value "SITE_NAME" %}", - "icon_url": "{% settings_value "SITE_ROOT" %}/static/img/logo@2x.png", + "username": "{% site_name %}", + "icon_url": "{% site_root %}/static/img/logo@2x.png", "attachments": [{ {% if check.status == "up" %} "color": "good",