From 8e7b05f96ecbcddb68389958d521360c068c9f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 17 Aug 2018 15:37:38 +0300 Subject: [PATCH] Gear icon links to Log page directly --- static/css/my_checks_desktop.css | 11 ++++----- static/js/checks.js | 33 -------------------------- templates/front/log.html | 15 ++++++++---- templates/front/my_checks.html | 4 ---- templates/front/my_checks_desktop.html | 24 ++----------------- 5 files changed, 17 insertions(+), 70 deletions(-) diff --git a/static/css/my_checks_desktop.css b/static/css/my_checks_desktop.css index fef85bde..9bd12c23 100644 --- a/static/css/my_checks_desktop.css +++ b/static/css/my_checks_desktop.css @@ -79,16 +79,16 @@ white-space: nowrap; } -.check-menu { +.show-log { visibility: hidden; } -.check-menu .icon-settings { +.show-log .icon-settings { font-size: 16px; } -.dropdown-menu > li > a.check-menu-remove { - color: #B71C1C; +tr:hover .show-log { + visibility: visible; } button.copy-link { @@ -114,9 +114,6 @@ button.copy-link:hover { -tr:hover .check-menu { - visibility: visible; -} tr:hover .copy-link { opacity: 1 diff --git a/static/js/checks.js b/static/js/checks.js index d7c0afdf..1d489d7c 100644 --- a/static/js/checks.js +++ b/static/js/checks.js @@ -13,17 +13,6 @@ $(function () { return false; }); - $(".check-menu-remove").click(function() { - var code = $(this).closest("tr.checks-row").attr("id"); - var url = "/checks/" + code + "/remove/"; - - $("#remove-check-form").attr("action", url); - $(".remove-check-name").text(this.dataset.name); - $('#remove-check-modal').modal("show"); - - return false; - }); - $(".integrations").tooltip({ container: "body", selector: "span", @@ -121,14 +110,6 @@ $(function () { }); - $(".pause-li a").click(function(e) { - var code = $(this).closest("tr.checks-row").attr("id"); - var url = "/checks/" + code + "/pause/"; - - $("#pause-form").attr("action", url).submit(); - return false; - }); - $(".show-log").click(function(e) { var code = $(this).closest("tr.checks-row").attr("id"); var url = "/checks/" + code + "/log/"; @@ -154,20 +135,6 @@ $(function () { } }); - function showUsage(el) { - var tr = $(el).closest("tr"); - - $(".ex", "#show-usage-modal").text(tr.data("url")); - $(".em", "#show-usage-modal").text(tr.data("email")); - - $("#show-usage-modal").modal("show"); - } - - $(".usage-examples").click(function(e) { - showUsage(e.target); - return false; - }); - // Auto-refresh var lastStatus = {}; var lastPing = {}; diff --git a/templates/front/log.html b/templates/front/log.html index 6cbe173a..e5652a58 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -18,7 +18,7 @@ -
+

How To Ping

@@ -84,6 +84,7 @@

Schedule

+ {% if check.kind == "simple" %} + {% elif check.kind == "cron" %} + + + {% endif %} @@ -152,8 +159,7 @@ - -
+
{% if events %}

Log @@ -265,7 +271,8 @@

{% else %} -
Log is empty. This check has not received any pings yet.
+

Log

+
This check has not received any pings yet.
{% endif %}
diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index be2d0469..75cc8e4a 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -47,8 +47,6 @@ {% include "front/update_name_modal.html" %} {% include "front/update_timeout_modal.html" %} -{% include "front/remove_check_modal.html" %} -{% include "front/show_usage_modal.html" %} -{% csrf_token %} - {% endblock %} {% block scripts %} diff --git a/templates/front/my_checks_desktop.html b/templates/front/my_checks_desktop.html index a2c8b103..fb5107c0 100644 --- a/templates/front/my_checks_desktop.html +++ b/templates/front/my_checks_desktop.html @@ -108,29 +108,9 @@ {% endfor %}
Period {{ check.timeout|hc_duration }} @@ -91,6 +92,12 @@ (Expected time between pings) Cron Expression + {{ check.schedule }} +
Grace Time