|
|
- <div id="update-timeout-modal" class="modal">
- <div class="modal-dialog">
- <div class="modal-content">
- <form id="update-timeout-form" method="post">
- {% csrf_token %}
- <input type="hidden" name="kind" value="simple" />
- <input type="hidden" name="timeout" id="update-timeout-timeout" />
- <input type="hidden" name="grace" id="update-timeout-grace" />
-
- <div class="modal-body">
- <div class="interval-controls">
- <label>Period</label>
- <input
- id="period-value"
- type="number"
- min="1"
- class="period-input form-control input-lg" />
- <select id="period-unit" class="period-input form-control input-lg">
- <option value="60">minutes</option>
- <option value="3600">hours</option>
- <option value="86400">days</option>
- </select>
- </div>
- <div id="period-slider"></div>
-
- <div class="interval-controls">
- <label>Grace Time</label>
- <input
- id="grace-value"
- type="number"
- min="1"
- class="grace-input form-control input-lg" />
- <select id="grace-unit" class="grace-input form-control input-lg">
- <option value="60">minutes</option>
- <option value="3600">hours</option>
- <option value="86400">days</option>
- </select>
- </div>
- <div id="grace-slider"></div>
-
- <div class="update-timeout-terms">
- <p>
- <span>Period</span>
- – The expected time between pings.
- </p>
- <p>
- <span>Grace Time</span>
- – When a check is late, <strong>or</strong> has
- received a "start" signal, how long to wait to send an alert.
- </p>
- </div>
- </div>
-
- <div class="modal-footer">
- <div class="btn-group pull-left">
- <label class="btn btn-default kind-simple active">Simple</label>
- <label class="btn btn-default kind-cron">Cron</label>
- </div>
-
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="submit" class="btn btn-primary">Save</button>
- </div>
- </form>
-
- <form id="update-cron-form" method="post">
- {% csrf_token %}
- <input type="hidden" name="kind" value="cron" />
- <div class="modal-body">
- <div class="row">
- <div class="col-md-4">
- <div class="form-group">
- <label for="schedule">Cron Expression</label>
- <input
- type="text"
- class="form-control"
- id="schedule"
- name="schedule"
- placeholder="* * * * *">
- <div id="schedule-hint">
- m h dom mon dow
- <a href="{% url 'hc-docs-cron' %}" target="_blank">(cheatsheet)</a>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- <label for="tz">Server's Time Zone</label>
- <br />
- <select
- id="tz"
- name="tz"
- class="selectpicker form-control"
- data-live-search="true">
- <option>UTC</option>
- {% for tz in timezones %}
- <option>{{ tz }}</option>{% endfor %}
- </select>
- </div>
- </div>
- <div class="col-md-4">
- <div class="form-group">
- <label for="update-timeout-grace-cron">Grace Time</label>
- <div class="input-group">
- <input
- type="number"
- min="1"
- max="43200"
- class="form-control"
- id="update-timeout-grace-cron"
- name="grace">
- <div class="input-group-addon">minutes</div>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <div id="cron-preview"></div>
- </div>
- </div>
- </div>
-
- <div class="modal-footer">
- <div class="btn-group pull-left">
- <label class="btn btn-default kind-simple">Simple</label>
- <label class="btn btn-default active kind-cron">Cron</label>
- </div>
-
- <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button id="update-cron-submit" type="submit" class="btn btn-primary" {% if not rw %}disabled{% endif %}>
- Save
- </button>
- </div>
- </form>
- </div>
- </div>
- </div>
|