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.

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