{% load hc_extras humanize %}
|
|
|
|
<ul id="checks-list" class="visible-xs">
|
|
{% for check in checks|sortchecks:sort %}
|
|
<li>
|
|
<h2>
|
|
<span class="{% if not check.name %}unnamed{% endif %}">
|
|
{{ check.name|default:"unnamed" }}
|
|
</span>
|
|
|
|
<code>{{ check.code }}</code>
|
|
</h2>
|
|
|
|
<a
|
|
href="#"
|
|
class="btn remove-link check-menu-remove"
|
|
data-name="{{ check.name_then_code }}"
|
|
data-url="{% url 'hc-remove-check' check.code %}">
|
|
<span class="icon-close"></span>
|
|
</a>
|
|
|
|
<table class="table">
|
|
<tr>
|
|
<th>Status</th>
|
|
<td>
|
|
{% if check.in_grace_period %}
|
|
<span id="sl-{{ check.code }}" class="label label-grace">grace</span>
|
|
{% else %}
|
|
<span id="sl-{{ check.code }}" class="label label-{{ check.get_status }}">{{ check.get_status }}</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% if check.tags %}
|
|
<tr>
|
|
<th>Tags</th>
|
|
<td>
|
|
{% for tag in check.tags_list %}
|
|
<span class="label label-tag">{{ tag }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if check.kind == "simple " %}
|
|
<tr>
|
|
<th>Period</th>
|
|
<td>{{ check.timeout|hc_duration }}</td>
|
|
</tr>
|
|
{% elif check.kind == "cron" %}
|
|
<tr>
|
|
<th>Schedule</th>
|
|
<td>{{ check.schedule }}</td>
|
|
</tr>
|
|
{% endif %}
|
|
<tr>
|
|
<th>Grace Time</th>
|
|
<td>{{ check.grace|hc_duration }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Last Ping</th>
|
|
<td id="lpm-{{ check.code}}">
|
|
{% include "front/last_ping_cell.html" with check=check %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<div>
|
|
<a
|
|
href="#"
|
|
data-name="{{ check.name }}"
|
|
data-tags="{{ check.tags }}"
|
|
data-url="{% url 'hc-update-name' check.code %}"
|
|
class="btn btn-default my-checks-name">
|
|
Rename
|
|
</a>
|
|
|
|
<a
|
|
href="#"
|
|
data-kind="{{ check.kind }}"
|
|
data-url="{% url 'hc-update-timeout' check.code %}"
|
|
data-timeout="{{ check.timeout.total_seconds }}"
|
|
data-grace="{{ check.grace.total_seconds }}"
|
|
data-schedule="{{ check.schedule }}"
|
|
data-tz="{{ check.tz }}"
|
|
class="btn btn-default timeout-grace">
|
|
{% if check.kind == "simple" %}
|
|
Change Period
|
|
{% elif check.kind == "cron" %}
|
|
Change Schedule
|
|
{% endif %}
|
|
</a>
|
|
|
|
<a href="{% url 'hc-log' check.code %}" class="btn btn-default">Log</a>
|
|
</div>
|
|
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|