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.

95 lines
3.2 KiB

  1. {% extends "base.html" %}
  2. {% load humanize static hc_extras %}
  3. {% block title %}Notification Channels - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>Telegram</h1>
  8. {% if chat_id %}
  9. <div class="jumbotron">
  10. <p>
  11. When a check goes <strong>up</strong> or <strong>down</strong>,
  12. {% site_name %} will send notifications to
  13. {% if chat_type == "private" %}
  14. a Telegram user
  15. {% else %}
  16. a Telegram chat
  17. {% endif %}
  18. named <strong>{{ chat_name }}</strong>. Sound good?
  19. </p>
  20. <form method="post" class="text-center">
  21. {% csrf_token %}
  22. <button type="submit" class="btn btn-lg btn-default">
  23. <img class="ai-icon" src="{% static 'img/integrations/telegram.png' %}" alt="Telegram" />
  24. Yes, connect Telegram
  25. </button>
  26. </form>
  27. </div>
  28. {% else %}
  29. <p>If your team uses <a href="https://telegram.org/">Telegram</a>,
  30. you can set up {% site_name %} to post status updates directly to an
  31. appropriate Telegram chat or user.</p>
  32. <h2>Setup Guide</h2>
  33. <div class="row ai-step">
  34. <div class="col-sm-6">
  35. <span class="step-no">1</span>
  36. <p>
  37. From your Telegram client, invite
  38. <strong>{{ bot_name }}</strong> to a group. It will get added
  39. as a member with no access to group messages.
  40. </p>
  41. <p>
  42. Alternatively, if you want notifications sent to yourself
  43. directly, start a conversation with
  44. <strong>{{ bot_name }}</strong>.
  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_telegram_1.png' %}">
  52. </div>
  53. </div>
  54. <div class="row ai-step">
  55. <div class="col-sm-6">
  56. <span class="step-no">2</span>
  57. <p>Type <strong><code>/start</code></strong> command.
  58. If there are multiple bots in the group, type
  59. <strong><code>/start@{{ bot_name }}</code></strong> instead.
  60. </p>
  61. <p>The bot will respond with a confirmation link.</p>
  62. </div>
  63. <div class="col-sm-6">
  64. <img
  65. class="ai-guide-screenshot"
  66. alt="Screenshot"
  67. src="{% static 'img/integrations/setup_telegram_2.png' %}">
  68. </div> </div>
  69. <div class="row ai-step">
  70. <div class="col-sm-6">
  71. <span class="step-no">3</span>
  72. <p>Click or tap on the confirmation link, and
  73. {% site_name %} will open in a browser window asking you to
  74. confirm the new integration.</p>
  75. <p>Confirm the integration, and it's done!</p>
  76. </div>
  77. <div class="col-sm-6">
  78. <img
  79. class="ai-guide-screenshot"
  80. alt="Screenshot"
  81. src="{% static 'img/integrations/setup_telegram_3.png' %}">
  82. </div>
  83. </div>
  84. {% endif %}
  85. </div>
  86. </div>
  87. {% endblock %}