forked from GithubBackups/healthchecks
Transport column (http, https, email) in log
This commit is contained in:
parent
749114d856
commit
36f0e7c82a
@ -8,10 +8,10 @@ $(function () {
|
|||||||
var w = total;
|
var w = total;
|
||||||
|
|
||||||
var result = "";
|
var result = "";
|
||||||
if (w) result += w + (w == 1 ? " week " : " weeks ");
|
if (w) result += w + (w === 1 ? " week " : " weeks ");
|
||||||
if (d) result += d + (d == 1 ? " day " : " days ");
|
if (d) result += d + (d === 1 ? " day " : " days ");
|
||||||
if (h) result += h + (h == 1 ? " hour " : " hours ");
|
if (h) result += h + (h === 1 ? " hour " : " hours ");
|
||||||
if (m) result += m + (m == 1 ? " minute " : " minutes ");
|
if (m) result += m + (m === 1 ? " minute " : " minutes ");
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
3
static/js/log.js
Normal file
3
static/js/log.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$(function () {
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
});
|
@ -7,29 +7,35 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<h1>Log for {{ check.name|default:check.code }}</h1>
|
<h1>Log for “{{ check.name|default:check.code }}”</h1>
|
||||||
{% if pings %}
|
{% if pings %}
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped log-table">
|
<table class="table table-striped log-table">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Transport</th>
|
||||||
<th>Time</th>
|
<th>Time</th>
|
||||||
<th>Remote IP</th>
|
<th>Remote IP</th>
|
||||||
<th>Method</th>
|
|
||||||
<th>User Agent</th>
|
<th>User Agent</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for ping in pings %}
|
{% for ping in pings %}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if ping.scheme == "email" %}
|
||||||
|
Email
|
||||||
|
{% elif ping.scheme == "http" %}
|
||||||
|
HTTP
|
||||||
|
{% elif ping.scheme == "https" %}
|
||||||
|
HTTPS
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="{{ ping.created }}">
|
title="{{ ping.created }} GMT">
|
||||||
{{ ping.created }}
|
{{ ping.created|naturaltime }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="remote-addr">{{ ping.remote_addr }}</td>
|
<td class="remote-addr">{{ ping.remote_addr }}</td>
|
||||||
<td class="method">
|
|
||||||
<span class="label label-default">{{ ping.method }}</span>
|
|
||||||
</td>
|
|
||||||
<td class="ua">{{ ping.ua }}</td>
|
<td class="ua">{{ ping.ua }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -42,3 +48,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% 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/log.js' %}"></script>
|
||||||
|
{% endcompress %}
|
||||||
|
{% endblock %}
|
@ -53,7 +53,7 @@
|
|||||||
{% if check.last_ping %}
|
{% if check.last_ping %}
|
||||||
<span
|
<span
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="{{ check.last_ping }}">
|
title="{{ check.last_ping }} GMT">
|
||||||
{{ check.last_ping|naturaltime }}
|
{{ check.last_ping|naturaltime }}
|
||||||
</span>
|
</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user