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.

123 lines
3.9 KiB

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