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.

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