Browse Source

Setup instructions for the Matrix integration.

pull/228/head
Pēteris Caune 6 years ago
parent
commit
e294ae0e9b
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
6 changed files with 64 additions and 1 deletions
  1. +2
    -1
      hc/front/views.py
  2. +1
    -0
      hc/settings.py
  3. BIN
      static/img/integrations/setup_matrix_1.png
  4. BIN
      static/img/integrations/setup_matrix_2.png
  5. BIN
      static/img/integrations/setup_matrix_3.png
  6. +61
    -0
      templates/integrations/add_matrix.html

+ 2
- 1
hc/front/views.py View File

@ -1140,7 +1140,8 @@ def add_matrix(request):
ctx = { ctx = {
"page": "channels", "page": "channels",
"form": form
"form": form,
"matrix_user_id": settings.MATRIX_USER_ID
} }
return render(request, "integrations/add_matrix.html", ctx) return render(request, "integrations/add_matrix.html", ctx)


+ 1
- 0
hc/settings.py View File

@ -198,6 +198,7 @@ TRELLO_APP_KEY = os.getenv("TRELLO_APP_KEY")
# Matrix # Matrix
MATRIX_HOMESERVER = os.getenv("MATRIX_HOMESERVER") MATRIX_HOMESERVER = os.getenv("MATRIX_HOMESERVER")
MATRIX_USER_ID = os.getenv("MATRIX_USER_ID")
MATRIX_ACCESS_TOKEN = os.getenv("MATRIX_ACCESS_TOKEN") MATRIX_ACCESS_TOKEN = os.getenv("MATRIX_ACCESS_TOKEN")
if os.path.exists(os.path.join(BASE_DIR, "hc/local_settings.py")): if os.path.exists(os.path.join(BASE_DIR, "hc/local_settings.py")):


BIN
static/img/integrations/setup_matrix_1.png View File

Before After
Width: 1079  |  Height: 588  |  Size: 51 KiB

BIN
static/img/integrations/setup_matrix_2.png View File

Before After
Width: 1075  |  Height: 390  |  Size: 40 KiB

BIN
static/img/integrations/setup_matrix_3.png View File

Before After
Width: 713  |  Height: 332  |  Size: 21 KiB

+ 61
- 0
templates/integrations/add_matrix.html View File

@ -14,6 +14,67 @@
to an appropriate Matrix room. to an appropriate Matrix room.
</p> </p>
<h2>Setup Guide</h2>
<div class="row ai-step">
<div class="col-sm-6">
<span class="step-no">1</span>
<div>
<p>
Invite <strong>{{ matrix_user_id }}</strong>
into your Matrix room.
</p>
<p>
<strong>Note:</strong> after joining the room,
{{ matrix_user_id }} will be
able to read its messages.
Do not invite to rooms with sensitive content.
Consider creating a dedicated room for notifications.
</p>
</div>
</div>
<div class="col-sm-6">
<img
class="ai-guide-screenshot"
alt="Screenshot"
src="{% static 'img/integrations/setup_matrix_1.png' %}">
</div>
</div>
<div class="row ai-step">
<div class="col-sm-6">
<span class="step-no">2</span>
<p>
Look up the room's <strong>alias</strong> or
<strong>ID</strong>, and paste it in the form
below and save the integration.
</p>
</div>
<div class="col-sm-6">
<img
class="ai-guide-screenshot"
alt="Screenshot"
src="{% static 'img/integrations/setup_matrix_2.png' %}">
</div>
</div>
<div class="row ai-step">
<div class="col-sm-6">
<span class="step-no">3</span>
<p>
{{ matrix_user_id }} will shortly join your room.
After that, you are all set! From now on
{% site_name %} will post notifications
to your room when checks go down or up.
</p>
</div>
<div class="col-sm-6">
<img
class="ai-guide-screenshot"
alt="Screenshot"
src="{% static 'img/integrations/setup_matrix_3.png' %}">
</div>
</div>
<h2>Integration Settings</h2> <h2>Integration Settings</h2>
<form method="post" class="form-horizontal"> <form method="post" class="form-horizontal">


Loading…
Cancel
Save