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.

97 lines
3.0 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Add Mattermost - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>Mattermost</h1>
  8. <p>If your team uses <a href="https://mattermost.com/">Mattermost</a>, you can set
  9. up {% site_name %} to post status updates directly to an appropriate
  10. Mattermost channel.</p>
  11. <h2>Setup Guide</h2>
  12. <div class="row ai-step">
  13. <div class="col-sm-6">
  14. <span class="step-no">1</span>
  15. Log into your Mattermost account and
  16. select <strong>Integrations</strong> in the
  17. hamburger menu.
  18. </div>
  19. <div class="col-sm-6">
  20. <img
  21. class="ai-guide-screenshot"
  22. alt="Screenshot"
  23. src="{% static 'img/integrations/setup_mattermost_1.png' %}">
  24. </div>
  25. </div>
  26. <div class="row ai-step">
  27. <div class="col-sm-6">
  28. <span class="step-no">2</span>
  29. <p>
  30. In the "Integrations" screen, select <strong>Incoming Webhook</strong>
  31. and then <strong>Add Incoming Webhook</strong>.
  32. </p>
  33. <p>Fill in the form and hit "Save".</p>
  34. </div>
  35. <div class="col-sm-6">
  36. <img
  37. class="ai-guide-screenshot"
  38. alt="Screenshot"
  39. src="{% static 'img/integrations/setup_mattermost_2.png' %}">
  40. </div>
  41. </div>
  42. <div class="row ai-step">
  43. <div class="col-sm-6">
  44. <span class="step-no">3</span>
  45. <p>Copy the displayed <strong>URL</strong> and paste it down below.</p>
  46. <p>Save the integration, and it's done!</p>
  47. </div>
  48. <div class="col-sm-6">
  49. <img
  50. class="ai-guide-screenshot"
  51. alt="Screenshot"
  52. src="{% static 'img/integrations/setup_mattermost_3.png' %}">
  53. </div>
  54. </div>
  55. <h2>Integration Settings</h2>
  56. <form method="post" class="form-horizontal" action="{% url 'hc-add-mattermost' %}">
  57. {% csrf_token %}
  58. <div class="form-group {{ form.value.css_classes }}">
  59. <label for="callback-url" class="col-sm-2 control-label">
  60. Webhook URL
  61. </label>
  62. <div class="col-sm-10">
  63. <input
  64. id="callback-url"
  65. type="text"
  66. class="form-control"
  67. name="value"
  68. placeholder="https://"
  69. value="{{ form.value.value|default:"" }}">
  70. {% if form.value.errors %}
  71. <div class="help-block">
  72. {{ form.value.errors|join:"" }}
  73. </div>
  74. {% endif %}
  75. </div>
  76. </div>
  77. <div class="form-group">
  78. <div class="col-sm-offset-2 col-sm-10">
  79. <button type="submit" class="btn btn-primary">Save Integration</button>
  80. </div>
  81. </div>
  82. </form>
  83. </div>
  84. </div>
  85. {% endblock %}