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.

96 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><a href="https://t.me/{{ bot_name }}">{{ bot_name }}</a></strong>
  39. to a group. It will get added as a member with no access to group
  40. messages.
  41. </p>
  42. <p>
  43. Alternatively, if you want notifications sent to yourself
  44. directly, start a conversation with
  45. <strong>{{ bot_name }}</strong>.
  46. </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_telegram_1.png' %}">
  53. </div>
  54. </div>
  55. <div class="row ai-step">
  56. <div class="col-sm-6">
  57. <span class="step-no">2</span>
  58. <p>Type <strong><code>/start</code></strong> command.
  59. If there are multiple bots in the group, type
  60. <strong><code>/start@{{ bot_name }}</code></strong> instead.
  61. </p>
  62. <p>The bot will respond with a confirmation link.</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_telegram_2.png' %}">
  69. </div> </div>
  70. <div class="row ai-step">
  71. <div class="col-sm-6">
  72. <span class="step-no">3</span>
  73. <p>Click or tap on the confirmation link, and
  74. {% site_name %} will open in a browser window asking you to
  75. confirm the new integration.</p>
  76. <p>Confirm the integration, and it's done!</p>
  77. </div>
  78. <div class="col-sm-6">
  79. <img
  80. class="ai-guide-screenshot"
  81. alt="Screenshot"
  82. src="{% static 'img/integrations/setup_telegram_3.png' %}">
  83. </div>
  84. </div>
  85. {% endif %}
  86. </div>
  87. </div>
  88. {% endblock %}