From 123013c67d870fdf30e9ed329fb575b18d8a89c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 15 Jun 2018 10:52:38 +0300 Subject: [PATCH] "Show Log" button in "Last Ping" dialog. --- static/js/checks.js | 7 +++++-- templates/front/my_checks.html | 13 ++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/static/js/checks.js b/static/js/checks.js index 33780070..1e2eda19 100644 --- a/static/js/checks.js +++ b/static/js/checks.js @@ -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; }); diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index 81cef31a..c4e819a6 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -353,7 +353,18 @@