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.

132 lines
5.9 KiB

  1. <div id="update-timeout-modal" class="modal">
  2. <div class="modal-dialog">
  3. <div class="modal-content">
  4. <form id="update-timeout-form" method="post">
  5. {% csrf_token %}
  6. <input type="hidden" name="kind" value="simple" />
  7. <input type="hidden" name="timeout" id="update-timeout-timeout" />
  8. <input type="hidden" name="grace" id="update-timeout-grace" />
  9. <div class="modal-body">
  10. <div class="update-timeout-info text-center">
  11. <span class="update-timeout-label">
  12. Period
  13. </span>
  14. <span
  15. id="period-slider-value"
  16. class="update-timeout-value">
  17. 1 day
  18. </span>
  19. </div>
  20. <div id="period-slider"></div>
  21. <div class="update-timeout-info text-center">
  22. <span class="update-timeout-label">
  23. Grace Time
  24. </span>
  25. <span
  26. id="grace-slider-value"
  27. class="update-timeout-value">
  28. 1 day
  29. </span>
  30. </div>
  31. <div id="grace-slider"></div>
  32. <div class="update-timeout-terms">
  33. <p>
  34. <span>Period</span>
  35. – The expected time between pings.
  36. </p>
  37. <p>
  38. <span>Grace Time</span>
  39. – When a check is late, <strong>or</strong> has
  40. received a "start" signal, how long to wait to send an alert.
  41. </p>
  42. </div>
  43. </div>
  44. <div class="modal-footer">
  45. <div class="btn-group pull-left">
  46. <label class="btn btn-default kind-simple active">Simple</label>
  47. <label class="btn btn-default kind-cron">Cron</label>
  48. </div>
  49. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  50. <button type="submit" class="btn btn-primary">Save</button>
  51. </div>
  52. </form>
  53. <form id="update-cron-form" method="post">
  54. {% csrf_token %}
  55. <input type="hidden" name="kind" value="cron" />
  56. <div class="modal-body">
  57. <div class="row">
  58. <div class="col-md-4">
  59. <div class="form-group">
  60. <label for="schedule">Cron Expression</label>
  61. <input
  62. type="text"
  63. class="form-control"
  64. id="schedule"
  65. name="schedule"
  66. placeholder="* * * * *">
  67. <div id="schedule-hint">
  68. m h dom mon dow
  69. <a href="{% url 'hc-docs-cron' %}" target="_blank">(cheatsheet)</a>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="col-md-4">
  74. <div class="form-group">
  75. <label for="tz">Server's Time Zone</label>
  76. <br />
  77. <select
  78. id="tz"
  79. name="tz"
  80. class="selectpicker form-control"
  81. data-live-search="true">
  82. <option>UTC</option>
  83. {% for tz in timezones %}
  84. <option>{{ tz }}</option>{% endfor %}
  85. </select>
  86. </div>
  87. </div>
  88. <div class="col-md-4">
  89. <div class="form-group">
  90. <label for="update-timeout-grace-cron">Grace Time</label>
  91. <div class="input-group">
  92. <input
  93. type="number"
  94. min="1"
  95. max="43200"
  96. class="form-control"
  97. id="update-timeout-grace-cron"
  98. name="grace">
  99. <div class="input-group-addon">minutes</div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <div class="row">
  105. <div class="col-sm-12">
  106. <div id="cron-preview"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="modal-footer">
  111. <div class="btn-group pull-left">
  112. <label class="btn btn-default kind-simple">Simple</label>
  113. <label class="btn btn-default active kind-cron">Cron</label>
  114. </div>
  115. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  116. <button id="update-cron-submit" type="submit" class="btn btn-primary" {% if not rw %}disabled{% endif %}>
  117. Save
  118. </button>
  119. </div>
  120. </form>
  121. </div>
  122. </div>
  123. </div>