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.

180 lines
6.0 KiB

  1. {% extends "base.html" %}
  2. {% load compress humanize staticfiles hc_extras %}
  3. {% block title %}Integrations - healthchecks.io{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <table class="table channels-table">
  8. {% if channels %}
  9. <tr>
  10. <th>Type</th>
  11. <th>Value</th>
  12. <th>Assigned Checks</th>
  13. <th></th>
  14. </tr>
  15. {% for ch in channels %}
  16. <tr class="channel-row">
  17. <td>
  18. {% if ch.kind == "email" %} Email {% endif %}
  19. {% if ch.kind == "webhook" %} Webhook {% endif %}
  20. {% if ch.kind == "slack" %} Slack {% endif %}
  21. {% if ch.kind == "hipchat" %} HipChat {% endif %}
  22. {% if ch.kind == "pd" %} PagerDuty {% endif %}
  23. {% if ch.kind == "po" %} Pushover {% endif %}
  24. </td>
  25. <td>
  26. <span class="preposition">
  27. {% if ch.kind == "email" %} to {% endif %}
  28. {% if ch.kind == "pd" %} API key {% endif %}
  29. {% if ch.kind == "po" %} user key {% endif %}
  30. </span>
  31. {% if ch.kind == "po" %}
  32. {{ ch.po_value|first }}
  33. ({{ ch.po_value|last }} priority)
  34. {% else %}
  35. {{ ch.value }}
  36. {% endif %}
  37. {% if ch.kind == "email" and not ch.email_verified %}
  38. <span class="channel-unconfirmed">(unconfirmed)
  39. {% endif %}
  40. </td>
  41. <td class="channels-num-checks">
  42. <a
  43. class="edit-checks"
  44. href="{% url 'hc-channel-checks' ch.code %}">
  45. {{ ch.checks.count }} of {{ num_checks }}
  46. </a>
  47. </td>
  48. <td>
  49. <button
  50. data-name="{{ ch.value }}"
  51. data-url="{% url 'hc-remove-channel' ch.code %}"
  52. class="btn btn-sm btn-default channel-remove"
  53. type="button">
  54. <span class="glyphicon glyphicon-trash"></span>
  55. </button>
  56. </td>
  57. <td>
  58. </td>
  59. </tr>
  60. {% endfor %}
  61. {% endif %}
  62. </table>
  63. <h1 class="ai-title">Add More</h1>
  64. <ul class="add-integration">
  65. <li>
  66. <img src="{% static 'img/integrations/slack.png' %}"
  67. alt="Slack icon" />
  68. <h2>Slack</h2>
  69. <p>A messaging app for teams.</p>
  70. <a href="{% url 'hc-add-slack' %}" class="btn btn-primary">Add Integration</a>
  71. </li>
  72. <li>
  73. <img src="{% static 'img/integrations/email.png' %}"
  74. alt="Email icon" />
  75. <h2>Email</h2>
  76. <p>Get an email message when check goes up or down.</p>
  77. <a href="{% url 'hc-add-email' %}" class="btn btn-primary">Add Integration</a>
  78. </li>
  79. <li>
  80. <img src="{% static 'img/integrations/webhook.png' %}"
  81. alt="Webhook icon" />
  82. <h2>WebHook</h2>
  83. <p>Receive a HTTP callback when a check goes down.</p>
  84. <a href="{% url 'hc-add-webhook' %}" class="btn btn-primary">Add Integration</a>
  85. </li>
  86. <li>
  87. <img src="{% static 'img/integrations/pd.png' %}"
  88. alt="PagerDuty icon" />
  89. <h2>PagerDuty</h2>
  90. <p>On-call scheduling, alerting, and incident tracking.</p>
  91. <a href="{% url 'hc-add-pd' %}" class="btn btn-primary">Add Integration</a>
  92. </li>
  93. <li>
  94. <img src="{% static 'img/integrations/hipchat.png' %}"
  95. alt="HipChat icon" />
  96. <h2>HipChat</h2>
  97. <p>Group and private chat, file sharing, and integrations.</p>
  98. <a href="{% url 'hc-add-hipchat' %}" class="btn btn-primary">Add Integration</a>
  99. </li>
  100. {% if enable_pushover %}
  101. <li>
  102. <img src="{% static 'img/integrations/pushover.png' %}"
  103. alt="Pushover icon" />
  104. <h2>Pushover</h2>
  105. <p>Receive instant push notifications on your phone or tablet.</p>
  106. <a href="{% url 'hc-add-pushover' %}" class="btn btn-primary">Add Integration</a>
  107. </li>
  108. {% endif %}
  109. </ul>
  110. </div>
  111. </div>
  112. <div id="checks-modal" class="modal">
  113. <div class="modal-dialog">
  114. <div class="modal-content">
  115. <h2>Email</h2>
  116. <p>Get an email message when check goes up or down</p>
  117. </div>
  118. </form>
  119. </div>
  120. </div>
  121. <div id="remove-channel-modal" class="modal">
  122. <div class="modal-dialog">
  123. <form id="remove-channel-form" method="post">
  124. {% csrf_token %}
  125. <div class="modal-content">
  126. <div class="modal-header">
  127. <button type="button" class="close" data-dismiss="modal">&times;</button>
  128. <h4 class="remove-check-title">Remove Channel <span class="remove-channel-name"></span></h4>
  129. </div>
  130. <div class="modal-body">
  131. <p>You are about to remove channel
  132. <strong class="remove-channel-name">---</strong>.
  133. </p>
  134. <p>Once it's gone it's gone. But, if you change your
  135. mind later, you can create a similar channel again.</p>
  136. <p>Do you want to continue?</p>
  137. </div>
  138. <div class="modal-footer">
  139. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  140. <button type="submit" class="btn btn-danger">Remove</button>
  141. </div>
  142. </div>
  143. </form>
  144. </div>
  145. </div>
  146. {% endblock %}
  147. {% block scripts %}
  148. {% compress js %}
  149. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  150. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  151. <script src="{% static 'js/channels.js' %}"></script>
  152. {% endcompress %}
  153. {% endblock %}