You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
4.1 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Slack Integration for {{ site_name }}{% endblock %}
  4. {% block description %}
  5. <meta name="description" content="Use {{ site_name }} with Slack: configure {{ site_name }} to post status updates directly to a Slack channel.">
  6. {% endblock %}
  7. {% block content %}
  8. <div class="row">
  9. <div class="col-sm-12">
  10. <div class="jumbotron">
  11. {% if request.user.is_authenticated %}
  12. <p>If your team uses <a href="https://slack.com/">Slack</a>, you can set
  13. up {{ site_name }} to post status updates directly to an appropriate
  14. Slack channel.</p>
  15. {% if authorize_url %}
  16. <div class="text-center">
  17. <a href="{{ authorize_url }}">
  18. <img
  19. alt="Add to Slack"
  20. src="{% static 'img/integrations/add_to_slack.png' %}"
  21. srcset="{% static 'img/integrations/add_to_slack.png' %} 1x, {% static 'img/integrations/[email protected]' %} 2x" />
  22. </a>
  23. </div>
  24. {% endif %}
  25. {% else %}
  26. <p>
  27. {{ site_name }} is a <strong>free</strong> and
  28. <a href="https://github.com/healthchecks/healthchecks">open source</a>
  29. service for monitoring your cron jobs, background processes and
  30. scheduled tasks. Before adding Slack integration, please log into
  31. {{ site_name }}:</p>
  32. <div class="text-center">
  33. <a href="{% url 'hc-login' %}"
  34. class="btn btn-primary btn-lg">Sign In</a>
  35. </div>
  36. {% endif %}
  37. </div>
  38. <h2>Setup Guide</h2>
  39. {% if not authorize_url %}
  40. <div class="row ai-step">
  41. <div class="col-sm-6">
  42. <span class="step-no"></span>
  43. <p>
  44. {% if request.user.is_authenticated %}
  45. Go
  46. {% else %}
  47. After logging in, go
  48. {% endif %}
  49. to the <strong>Integrations</strong> page,
  50. and click on <strong>Add Integration</strong> next to the
  51. Slack integration.
  52. </p>
  53. </div>
  54. <div class="col-sm-6">
  55. <img
  56. class="ai-guide-screenshot"
  57. alt="Screenshot"
  58. src="{% static 'img/integrations/setup_slack_btn_0.png' %}">
  59. </div>
  60. </div>
  61. {% endif %}
  62. <div class="row ai-step">
  63. <div class="col-sm-6">
  64. <span class="step-no"></span>
  65. <p>
  66. Click on the "Add to Slack" button, and you should
  67. be on a page that says "{{ site_name }} would like access to
  68. your Slack team". Select the team you want to add the
  69. {{ site_name }} integration app to.
  70. </p>
  71. </div>
  72. <div class="col-sm-6">
  73. <img
  74. class="ai-guide-screenshot"
  75. alt="Screenshot"
  76. src="{% static 'img/integrations/setup_slack_btn_1.png' %}">
  77. </div>
  78. </div>
  79. <div class="row ai-step">
  80. <div class="col-sm-6">
  81. <span class="step-no"></span>
  82. <p>
  83. You should now be on a page that says "{{ site_name }} would
  84. like access to <i>TEAM NAME</i>". Select the channel you want to
  85. post {{ site_name }} notifications to.
  86. </p>
  87. </div>
  88. <div class="col-sm-6">
  89. <img
  90. class="ai-guide-screenshot"
  91. alt="Screenshot"
  92. src="{% static 'img/integrations/setup_slack_btn_2.png' %}">
  93. </div>
  94. </div>
  95. <div class="row ai-step">
  96. <div class="col-sm-6">
  97. <span class="step-no"></span>
  98. <p>
  99. That is all! You will now be redirected back to
  100. "Integrations" page on {{ site_name }} and see
  101. the new integration!
  102. </p>
  103. </div>
  104. <div class="col-sm-6">
  105. <img
  106. class="ai-guide-screenshot"
  107. alt="Screenshot"
  108. src="{% static 'img/integrations/setup_slack_btn_3.png' %}">
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. {% endblock %}