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.

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