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.

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