|
|
@ -1,5 +1,5 @@ |
|
|
|
{% extends "base.html" %} |
|
|
|
{% load compress humanize static hc_extras %} |
|
|
|
{% load compress humanize staticfiles hc_extras %} |
|
|
|
|
|
|
|
{% block title %}My Checks - {% site_name %}{% endblock %} |
|
|
|
|
|
|
@ -7,165 +7,33 @@ |
|
|
|
{% block content %} |
|
|
|
|
|
|
|
<div class="row"> |
|
|
|
<div id="details-head" class="col-sm-12"> |
|
|
|
<h1> |
|
|
|
{{ check.name_then_code }} |
|
|
|
<button id="edit-name" class="btn btn-sm btn-default">Edit</button> |
|
|
|
</h1> |
|
|
|
{% for tag in check.tags_list %} |
|
|
|
<span class="label label-tag">{{ tag }}</span> |
|
|
|
{% endfor %} |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="col-sm-5"> |
|
|
|
<div class="details-block"> |
|
|
|
<h2>How To Ping</h2> |
|
|
|
<div> |
|
|
|
<p>Keep this check up by making HTTP requests to this URL:</p> |
|
|
|
<code>{{ check.url }}</code> |
|
|
|
<p>Or by sending emails to this address:</p> |
|
|
|
<code>{{ check.email }}</code> |
|
|
|
</div> |
|
|
|
<div class="text-right"> |
|
|
|
<button |
|
|
|
data-label="Copy URL" |
|
|
|
data-clipboard-text="{{ check.url }}" |
|
|
|
class="btn btn-sm btn-default copy-btn">Copy URL</button> |
|
|
|
<button |
|
|
|
data-label="Copy Email" |
|
|
|
data-clipboard-text="{{ check.email }}" |
|
|
|
class="btn btn-sm btn-default copy-btn">Copy Email</button> |
|
|
|
<button |
|
|
|
data-toggle="modal" |
|
|
|
data-target="#show-usage-modal" |
|
|
|
class="btn btn-sm btn-default">Usage Examples</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="details-block"> |
|
|
|
<h2>Current Status</h2> |
|
|
|
<table> |
|
|
|
<tr> |
|
|
|
<td> |
|
|
|
<span id="log-status-icon" class="status icon-{{ check.get_status }}"></span> |
|
|
|
</td> |
|
|
|
<td id="log-status-text"> |
|
|
|
{% include "front/log_status_text.html" %} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
<div class="text-right"> |
|
|
|
<form action="{% url 'hc-pause' check.code %}" method="post"> |
|
|
|
{% csrf_token %} |
|
|
|
<input type="submit" class="btn btn-sm btn-default" value="Pause" /> |
|
|
|
</form> |
|
|
|
|
|
|
|
<button |
|
|
|
id="ping-now" |
|
|
|
data-url="{{ check.url }}" |
|
|
|
class="btn btn-sm btn-default">Ping Now!</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="details-block"> |
|
|
|
<h2>Schedule</h2> |
|
|
|
<table id="log-schedule"> |
|
|
|
<tr> |
|
|
|
{% if check.kind == "simple" %} |
|
|
|
<th>Period</th> |
|
|
|
<td> |
|
|
|
<span class="value">{{ check.timeout|hc_duration }}</span> |
|
|
|
<div class="subtitle"> |
|
|
|
(Expected time between pings) |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
{% elif check.kind == "cron" %} |
|
|
|
<th>Cron Expression</th> |
|
|
|
<td> |
|
|
|
<span class="value">{{ check.schedule }}</span> |
|
|
|
</td> |
|
|
|
{% endif %} |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<th>Grace Time</th> |
|
|
|
<td> |
|
|
|
<span class="value">{{ check.grace|hc_duration }}</span> |
|
|
|
<div class="subtitle"> |
|
|
|
(When a check is late, how long to wait until an alert is sent) |
|
|
|
</div> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
<div class="text-right"> |
|
|
|
<button |
|
|
|
id="edit-timeout" |
|
|
|
class="btn btn-sm btn-default timeout-grace" |
|
|
|
data-code="{{ check.code }}" |
|
|
|
data-kind="{{ check.kind }}" |
|
|
|
data-timeout="{{ check.timeout.total_seconds }}" |
|
|
|
data-grace="{{ check.grace.total_seconds }}" |
|
|
|
data-schedule="{{ check.schedule }}" |
|
|
|
data-tz="{{ check.tz }}"> |
|
|
|
Change Schedule</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="details-block"> |
|
|
|
<h2>Notification Methods</h2> |
|
|
|
<table id="details-integrations" class="table"> |
|
|
|
{% for channel in channels %} |
|
|
|
<tr> |
|
|
|
<th> |
|
|
|
{% if channel in check.channel_set.all %} |
|
|
|
<span class="label label-success">ON</span> |
|
|
|
{% else %} |
|
|
|
<span class="label label-default">OFF</span> |
|
|
|
{% endif %} |
|
|
|
</th> |
|
|
|
<td> |
|
|
|
<span class="icon-{{ channel.kind }}"></span> |
|
|
|
{{ channel }} |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
{% endfor %} |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="details-block"> |
|
|
|
<h2>Remove</h2> |
|
|
|
<p>Permanently remove this check from your account.</p> |
|
|
|
<div class="text-right"> |
|
|
|
<button |
|
|
|
id="details-remove-check" |
|
|
|
data-toggle="modal" |
|
|
|
data-target="#remove-check-modal" |
|
|
|
class="btn btn-sm btn-default">Remove This Check</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-sm-12"> |
|
|
|
<ol class="breadcrumb"> |
|
|
|
<li><a href="{% url 'hc-checks' %}">Checks</a></li> |
|
|
|
<li> |
|
|
|
<a href="{% url 'hc-details' check.code %}"> |
|
|
|
{{ check.name_then_code }} |
|
|
|
</a> |
|
|
|
</li> |
|
|
|
<li class="active">Log</li> |
|
|
|
|
|
|
|
<li id="format-switcher-container" class="pull-right"> |
|
|
|
<div id="format-switcher" class="btn-group" data-toggle="buttons"> |
|
|
|
<label class="btn btn-default btn-xs" data-format="utc"> |
|
|
|
<input type="radio" name="date-format" checked> |
|
|
|
UTC |
|
|
|
</label> |
|
|
|
|
|
|
|
<label class="btn btn-default btn-xs active" data-format="local"> |
|
|
|
<input type="radio" name="date-format"> |
|
|
|
Local Time |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</ol> |
|
|
|
|
|
|
|
<div class="col-sm-7"> |
|
|
|
{% if events %} |
|
|
|
<h2> |
|
|
|
Log |
|
|
|
<small>Click on individual items for details</small> |
|
|
|
<div id="format-switcher" class="btn-group pull-right" data-toggle="buttons"> |
|
|
|
<label class="btn btn-default btn-xs" data-format="utc"> |
|
|
|
<input type="radio" name="date-format" checked> |
|
|
|
UTC |
|
|
|
</label> |
|
|
|
|
|
|
|
<label class="btn btn-default btn-xs active" data-format="local"> |
|
|
|
<input type="radio" name="date-format"> |
|
|
|
Local Time |
|
|
|
</label> |
|
|
|
</div> |
|
|
|
</h2> |
|
|
|
|
|
|
|
<div id="log-container"> |
|
|
|
<div class="table-responsive"> |
|
|
|
<table class="table" id="log"> |
|
|
|
{% for event in events %} |
|
|
|
{% if event.n %} |
|
|
@ -201,6 +69,9 @@ |
|
|
|
{% if event.ua %} |
|
|
|
- {{ event.ua }} |
|
|
|
{% endif %} |
|
|
|
{% if event.body %} |
|
|
|
- {{ event.body|trunc }} |
|
|
|
{% endif %} |
|
|
|
</span> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
@ -247,17 +118,19 @@ |
|
|
|
{% endfor %} |
|
|
|
</table> |
|
|
|
|
|
|
|
{% if can_load_more %} |
|
|
|
<p class="text-center"> |
|
|
|
Showing {{ num_showing }} most recent pings. |
|
|
|
<a href="?full_log=1">Load More…</a> |
|
|
|
{% if show_limit_notice and limit < 1000 %} |
|
|
|
<p class="alert alert-info"> |
|
|
|
<strong>Showing last {{ limit }} pings.</strong> |
|
|
|
Want to see more? |
|
|
|
<a href="{% url 'hc-pricing' %}"> |
|
|
|
Upgrade your account! |
|
|
|
</a> |
|
|
|
</p> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
</div> |
|
|
|
{% else %} |
|
|
|
<h2>Log</h2> |
|
|
|
<div class="alert alert-info">This check has not received any pings yet.</div> |
|
|
|
<div class="alert alert-info">Log is empty. This check has not received any pings yet.</div> |
|
|
|
{% endif %} |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -271,26 +144,18 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<form> |
|
|
|
{% csrf_token %} |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
|
|
|
|
{% include "front/update_name_modal.html" %} |
|
|
|
{% include "front/update_timeout_modal.html" %} |
|
|
|
{% include "front/show_usage_modal.html" %} |
|
|
|
{% include "front/remove_check_modal.html" %} |
|
|
|
|
|
|
|
{% endblock %} |
|
|
|
|
|
|
|
{% block scripts %} |
|
|
|
{% compress js %} |
|
|
|
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/bootstrap.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/clipboard.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/selectize.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/nouislider.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/snippet-copy.js' %}"></script> |
|
|
|
<script src="{% static 'js/moment.min.js' %}"></script> |
|
|
|
<script src="{% static 'js/update-timeout-modal.js' %}"></script> |
|
|
|
<script src="{% static 'js/adaptive-setinterval.js' %}"></script> |
|
|
|
<script src="{% static 'js/log.js' %}"></script> |
|
|
|
{% endcompress %} |
|
|
|
{% endblock %} |