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.

154 lines
5.7 KiB

9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {% extends "base.html" %}
  2. {% load compress staticfiles %}
  3. {% block title %}My Checks - healthchecks.io{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h1>My Checks</h1>
  8. {% if checks %}
  9. {% include "front/my_checks_mobile.html" %}
  10. {% include "front/my_checks_desktop.html" %}
  11. {% else %}
  12. <div class="alert alert-info">You don't have any checks yet.</div>
  13. {% endif %}
  14. </div>
  15. </div>
  16. <div class="row">
  17. <div class="col-sm-12"></div>
  18. <form method="post" action="{% url 'hc-add-check' %}" class="text-center">
  19. {% csrf_token %}
  20. <input type="submit" class="btn btn-primary btn-lg" value="Add Check">
  21. </form>
  22. </div>
  23. </div>
  24. <div id="update-name-modal" class="modal">
  25. <div class="modal-dialog">
  26. <form id="update-name-form" method="post">
  27. {% csrf_token %}
  28. <div class="modal-content">
  29. <div class="modal-header">
  30. <button type="button" class="close" data-dismiss="modal">&times;</span></button>
  31. <h4 class="update-timeout-title">Name</h4>
  32. </div>
  33. <div class="modal-body">
  34. <p>Give this check a human-friendly name, so you can
  35. easily recognize it later:</p>
  36. <input
  37. id="update-name-input"
  38. name="name"
  39. type="text"
  40. value="---"
  41. placeholder="unnamed"
  42. class="input-name form-control" />
  43. </div>
  44. <div class="modal-footer">
  45. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  46. <button type="submit" class="btn btn-primary">Save</button>
  47. </div>
  48. </div>
  49. </form>
  50. </div>
  51. </div>
  52. <div id="update-timeout-modal" class="modal">
  53. <div class="modal-dialog">
  54. <form id="update-timeout-form" method="post">
  55. {% csrf_token %}
  56. <input type="hidden" name="timeout" id="update-timeout-timeout" />
  57. <input type="hidden" name="grace" id="update-timeout-grace" />
  58. <div class="modal-content">
  59. <div class="modal-body">
  60. <div class="update-timeout-info text-center">
  61. <span
  62. class="update-timeout-label"
  63. data-toggle="tooltip"
  64. title="Expected time between pings.">
  65. Period
  66. </span>
  67. <span
  68. id="period-slider-value"
  69. class="update-timeout-value">
  70. 1 day
  71. </span>
  72. </div>
  73. <div id="period-slider"></div>
  74. <div class="update-timeout-info text-center">
  75. <span
  76. class="update-timeout-label"
  77. data-toggle="tooltip"
  78. title="When check is late, how much time to wait until alert is sent">
  79. Grace Time
  80. </span>
  81. <span
  82. id="grace-slider-value"
  83. class="update-timeout-value">
  84. 1 day
  85. </span>
  86. </div>
  87. <div id="grace-slider"></div>
  88. <div class="update-timeout-terms">
  89. <p>
  90. <span>Period</span>
  91. Expected time between pings.
  92. </p>
  93. <p>
  94. <span>Grace Time</span>
  95. When a check is late, how much time to wait until alert is sent.
  96. </p>
  97. </div>
  98. </div>
  99. <div class="modal-footer">
  100. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  101. <button type="submit" class="btn btn-primary">Save</button>
  102. </div>
  103. </div>
  104. </form>
  105. </div>
  106. </div>
  107. <div id="remove-check-modal" class="modal">
  108. <div class="modal-dialog">
  109. <form id="remove-check-form" method="post">
  110. {% csrf_token %}
  111. <div class="modal-content">
  112. <div class="modal-header">
  113. <button type="button" class="close" data-dismiss="modal">&times;</span></button>
  114. <h4 class="remove-check-title">Remove Check <span class="remove-check-name"></h4>
  115. </div>
  116. <div class="modal-body">
  117. <p>You are about to remove check
  118. <strong class="remove-check-name">---</strong>.
  119. </p>
  120. <p>Once it's gone there is no "undo" and you cannot get
  121. the old ping URL back.</p>
  122. <p>Are you sure?</p>
  123. </div>
  124. <div class="modal-footer">
  125. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  126. <button type="submit" class="btn btn-danger">Remove</button>
  127. </div>
  128. </div>
  129. </form>
  130. </div>
  131. </div>
  132. {% endblock %}
  133. {% block scripts %}
  134. {% compress js %}
  135. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  136. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  137. <script src="{% static 'js/nouislider.min.js' %}"></script>
  138. <script src="{% static 'js/checks.js' %}"></script>
  139. {% endcompress %}
  140. {% endblock %}