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.

109 lines
3.4 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Add Matrix - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>Matrix</h1>
  8. <p>
  9. If your team uses <a href="https://matrix.org/">Matrix</a>,
  10. you can set up {% site_name %} to post notifications
  11. to an appropriate Matrix room.
  12. </p>
  13. <h2>Setup Guide</h2>
  14. <div class="row ai-step">
  15. <div class="col-sm-6">
  16. <span class="step-no">1</span>
  17. <div>
  18. <p>
  19. Invite <strong>{{ matrix_user_id }}</strong>
  20. into your Matrix room.
  21. </p>
  22. <p>
  23. <strong>Note:</strong> after joining the room,
  24. {{ matrix_user_id }} will be
  25. able to read its messages.
  26. Do not invite to rooms with sensitive content.
  27. Consider creating a dedicated room for notifications.
  28. </p>
  29. </div>
  30. </div>
  31. <div class="col-sm-6">
  32. <img
  33. class="ai-guide-screenshot"
  34. alt="Screenshot"
  35. src="{% static 'img/integrations/setup_matrix_1.png' %}">
  36. </div>
  37. </div>
  38. <div class="row ai-step">
  39. <div class="col-sm-6">
  40. <span class="step-no">2</span>
  41. <p>
  42. Look up the room's <strong>alias</strong> or
  43. <strong>ID</strong>, and paste it in the form
  44. below and save the integration.
  45. </p>
  46. </div>
  47. <div class="col-sm-6">
  48. <img
  49. class="ai-guide-screenshot"
  50. alt="Screenshot"
  51. src="{% static 'img/integrations/setup_matrix_2.png' %}">
  52. </div>
  53. </div>
  54. <div class="row ai-step">
  55. <div class="col-sm-6">
  56. <span class="step-no">3</span>
  57. <p>
  58. {{ matrix_user_id }} will shortly join your room.
  59. After that, you are all set! From now on
  60. {% site_name %} will post notifications
  61. to your room when checks go down or up.
  62. </p>
  63. </div>
  64. <div class="col-sm-6">
  65. <img
  66. class="ai-guide-screenshot"
  67. alt="Screenshot"
  68. src="{% static 'img/integrations/setup_matrix_3.png' %}">
  69. </div>
  70. </div>
  71. <h2>Integration Settings</h2>
  72. <form method="post" class="form-horizontal">
  73. {% csrf_token %}
  74. <div class="form-group {{ form.room_id.css_classes }}">
  75. <label for="alias" class="col-sm-2 control-label">Room Alias or ID</label>
  76. <div class="col-sm-6">
  77. <input
  78. id="alias"
  79. type="text"
  80. class="form-control"
  81. name="alias"
  82. placeholder="!abc:matrix.org"
  83. value="{{ form.alias.value|default:"" }}">
  84. {% if form.alias.errors %}
  85. <div class="help-block">
  86. {{ form.alias.errors|join:"" }}
  87. </div>
  88. {% endif %}
  89. </div>
  90. </div>
  91. <div class="form-group">
  92. <div class="col-sm-offset-2 col-sm-10">
  93. <button type="submit" class="btn btn-primary">Save Integration</button>
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. </div>
  99. {% endblock %}