Browse Source

"Show Log" button in "Last Ping" dialog.

pull/178/head
Pēteris Caune 7 years ago
parent
commit
123013c67d
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 17 additions and 3 deletions
  1. +5
    -2
      static/js/checks.js
  2. +12
    -1
      templates/front/my_checks.html

+ 5
- 2
static/js/checks.js View File

@ -214,11 +214,11 @@ $(function () {
$('#ping-details-modal').modal("show");
var code = $(this).closest("tr").data("code");
var url = "/checks/" + code + "/last_ping/";
var lastPingUrl = "/checks/" + code + "/last_ping/";
var token = $('input[name=csrfmiddlewaretoken]').val();
$.ajax({
url: url,
url: lastPingUrl,
type: "post",
headers: {"X-CSRFToken": token},
success: function(data) {
@ -226,6 +226,9 @@ $(function () {
}
});
var logUrl = "/checks/" + code + "/log/";
$("#ping-details-log").attr("href", logUrl);
return false;
});


+ 12
- 1
templates/front/my_checks.html View File

@ -353,7 +353,18 @@
<div class="modal-content">
<div id="ping-details-body">Loading</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Got It!</button>
<a
id="ping-details-log"
href="#"
class="btn btn-default">
Show Log
</a>
<button
type="button"
class="btn btn-default"
data-dismiss="modal">
Got It!
</button>
</div>
</div>
</div>


Loading…
Cancel
Save