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.

131 lines
5.8 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, or has received a "start" signal, how long to wait to send an alert.
  40. </p>
  41. </div>
  42. </div>
  43. <div class="modal-footer">
  44. <div class="btn-group pull-left">
  45. <label class="btn btn-default kind-simple active">Simple</label>
  46. <label class="btn btn-default kind-cron">Cron</label>
  47. </div>
  48. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  49. <button type="submit" class="btn btn-primary">Save</button>
  50. </div>
  51. </form>
  52. <form id="update-cron-form" method="post">
  53. {% csrf_token %}
  54. <input type="hidden" name="kind" value="cron" />
  55. <div class="modal-body">
  56. <div class="row">
  57. <div class="col-md-4">
  58. <div class="form-group">
  59. <label for="schedule">Cron Expression</label>
  60. <input
  61. type="text"
  62. class="form-control"
  63. id="schedule"
  64. name="schedule"
  65. placeholder="* * * * *">
  66. <div id="schedule-hint">
  67. m h dom mon dow
  68. <a href="{% url 'hc-docs-cron' %}" target="_blank">(cheatsheet)</a>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="col-md-4">
  73. <div class="form-group">
  74. <label for="tz">Server's Time Zone</label>
  75. <br />
  76. <select
  77. id="tz"
  78. name="tz"
  79. class="selectpicker form-control"
  80. data-live-search="true">
  81. <option>UTC</option>
  82. {% for tz in timezones %}
  83. <option>{{ tz }}</option>{% endfor %}
  84. </select>
  85. </div>
  86. </div>
  87. <div class="col-md-4">
  88. <div class="form-group">
  89. <label for="cron-grace">Grace Time</label>
  90. <div class="input-group">
  91. <input
  92. type="number"
  93. min="1"
  94. max="43200"
  95. class="form-control"
  96. id="update-timeout-grace-cron"
  97. name="grace">
  98. <div class="input-group-addon">minutes</div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="row">
  104. <div class="col-sm-12">
  105. <div id="cron-preview"></div>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="modal-footer">
  110. <div class="btn-group pull-left">
  111. <label class="btn btn-default kind-simple">Simple</label>
  112. <label class="btn btn-default active kind-cron">Cron</label>
  113. </div>
  114. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  115. <button id="update-cron-submit" type="submit" class="btn btn-primary" {% if not rw %}disabled{% endif %}>
  116. Save
  117. </button>
  118. </div>
  119. </form>
  120. </div>
  121. </div>
  122. </div>