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.

133 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
  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 Timezone</label>
  81. <br />
  82. <select id="tz" name="tz" class="form-control">
  83. <option>UTC</option>
  84. {% for tz in timezones %}
  85. <option>{{ tz }}</option>{% endfor %}
  86. </select>
  87. </div>
  88. </div>
  89. <div class="col-md-4">
  90. <div class="form-group">
  91. <label for="cron-grace">Grace Time</label>
  92. <div class="input-group">
  93. <input
  94. type="number"
  95. min="1"
  96. max="43200"
  97. class="form-control"
  98. id="update-timeout-grace-cron"
  99. name="grace">
  100. <div class="input-group-addon">minutes</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div class="row">
  106. <div class="col-sm-12">
  107. <div id="cron-preview"></div>
  108. </div>
  109. </div>
  110. </div>
  111. <div class="modal-footer">
  112. <div class="btn-group pull-left">
  113. <label class="btn btn-default kind-simple">Simple</label>
  114. <label class="btn btn-default active kind-cron">Cron</label>
  115. </div>
  116. <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
  117. <button id="update-cron-submit" type="submit" class="btn btn-primary">
  118. Save
  119. </button>
  120. </div>
  121. </form>
  122. </div>
  123. </div>
  124. </div>