Browse Source

Fix local time / UTC switcher (it was getting reset on auto-updates).

pull/193/head
Pēteris Caune 6 years ago
parent
commit
8fa9a6f3f6
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
3 changed files with 19 additions and 18 deletions
  1. +1
    -1
      static/js/details.js
  2. +18
    -0
      templates/front/details.html
  3. +0
    -17
      templates/front/details_events.html

+ 1
- 1
static/js/details.js View File

@ -42,7 +42,7 @@ $(function () {
if (data.events) {
lastUpdated = data.updated;
$("#events").html(data.events);
$("#log-container").html(data.events);
switchDateFormat(lastFormat);
}
}


+ 18
- 0
templates/front/details.html View File

@ -148,6 +148,24 @@
<div id="events" class="col-sm-7">
<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>
</div>
</div>


+ 0
- 17
templates/front/details_events.html View File

@ -1,21 +1,5 @@
{% load hc_extras %}
{% 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>
<table class="table" id="log">
{% for event in events %}
{% if event.n %}
@ -103,6 +87,5 @@
</p>
{% endif %}
{% else %}
<h2>Log</h2>
<div class="alert alert-info">This check has not received any pings yet.</div>
{% endif %}

Loading…
Cancel
Save