diff --git a/static/css/checks-list.css b/static/css/checks-list.css new file mode 100644 index 00000000..6ddbadb6 --- /dev/null +++ b/static/css/checks-list.css @@ -0,0 +1,45 @@ +#checks-list { + list-style: none; + padding: 0; + margin-top: 48px; +} + +#checks-list li { + margin-bottom: 48px; + position: relative; +} + +#checks-list h2 { + font-size: 18px; + font-weight: 400; +} + +#checks-list h2 .glyphicon { + position: relative; + top: 11px; + margin: 0 10px; + +} + +#checks-list h2 code { + display: block; + font-size: 12px; + margin-top: 4px; + padding: 0; +} + +#checks-list .remove-link { + color: #AAA; + position: absolute; + top: 0; + right: 0; +} + +#checks-list .unnamed { + color: #999; + font-style: italic; +} + +#checks-list th { + width: 100px; +} \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index 022595ce..33fab815 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -131,7 +131,7 @@ table.table tr > th.th-name { vertical-align: middle; } -.my-checks-name { +#checks-table .my-checks-name { border: 1px solid rgba(0, 0, 0, 0); padding: 6px; display: block; @@ -168,13 +168,13 @@ td.inactive .popover { padding-left: 15px; } -.timeout_grace { +#checks-table .timeout-grace { border: 1px solid rgba(0, 0, 0, 0); padding: 6px; display: block; } -#checks-table tr:hover .timeout_grace { +#checks-table tr:hover .timeout-grace { border: 1px dotted #AAA; } diff --git a/static/js/checks.js b/static/js/checks.js index b3213c39..9d5b9036 100644 --- a/static/js/checks.js +++ b/static/js/checks.js @@ -80,11 +80,12 @@ $(function () { $("#update-name-form").attr("action", $this.data("url")); $("#update-name-input").val($this.data("name")); $('#update-name-modal').modal("show"); + $("#update-name-input").focus(); return false; }); - $(".timeout_grace").click(function() { + $(".timeout-grace").click(function() { var $this = $(this); $("#update-timeout-form").attr("action", $this.data("url")); diff --git a/templates/base.html b/templates/base.html index 895c3985..a0f800a8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,6 +5,7 @@ {% block title %}healthchecks.io - Get Notified When Your Cron Jobs Fail{% endblock %} + @@ -14,6 +15,7 @@ + {% endcompress %} @@ -22,37 +24,50 @@ @@ -69,6 +84,12 @@ - {% block scripts %}{% endblock %} + + {% block scripts %} + {% compress js %} + + + {% endcompress %} + {% endblock %} diff --git a/templates/front/log.html b/templates/front/log.html index 8b945fdd..84ba0b33 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -9,6 +9,7 @@

Log for {{ check.name|default:check.code }}

{% if pings %} +
@@ -33,6 +34,7 @@ {% endfor %}
Time
+
{% else %}
Log is empty. This check has not received any pings yet.
{% endif %} diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html index d4f9ca2a..7b840e1a 100644 --- a/templates/front/my_checks.html +++ b/templates/front/my_checks.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load compress humanize staticfiles hc_extras %} +{% load compress staticfiles %} {% block title %}My Checks - healthchecks.io{% endblock %} @@ -9,94 +9,8 @@

My Checks

{% if checks %} - - - - - - - - - - {% for check in checks %} - - - - - - - - - {% endfor %} - -
NameURL - Period
- Grace -
Last Ping
- {% if check.get_status == "new" %} - - {% elif check.get_status == "up" %} - - {% elif check.get_status == "grace" %} - - {% elif check.get_status == "down" %} - - {% endif %} - - - {{ check.name|default:"unnamed" }} - - - {{ check.url }} - - - {{ check.timeout|hc_duration }} -
- - {{ check.grace|hc_duration }} - -
-
- {% if check.last_ping %} - - {{ check.last_ping|naturaltime }} - - {% else %} - Never - {% endif %} - - -
+ {% include "front/my_checks_mobile.html" %} + {% include "front/my_checks_desktop.html" %} {% else %}
You don't have any checks yet.
{% endif %} diff --git a/templates/front/my_checks_desktop.html b/templates/front/my_checks_desktop.html new file mode 100644 index 00000000..b970143e --- /dev/null +++ b/templates/front/my_checks_desktop.html @@ -0,0 +1,90 @@ +{% load hc_extras humanize %} + + + + + + + + + + + {% for check in checks %} + + + + + + + + + {% endfor %} + + diff --git a/templates/front/my_checks_mobile.html b/templates/front/my_checks_mobile.html new file mode 100644 index 00000000..7a10d5d7 --- /dev/null +++ b/templates/front/my_checks_mobile.html @@ -0,0 +1,79 @@ +{% load hc_extras humanize %} + + diff --git a/templates/front/welcome.html b/templates/front/welcome.html index 560e8f04..12464433 100644 --- a/templates/front/welcome.html +++ b/templates/front/welcome.html @@ -30,13 +30,13 @@
  • Python
  • -
  • +
  • -
  • +
  • -
  • +
  • @@ -187,9 +187,4 @@ {% endblock %} -{% block scripts %} -{% compress js %} - - -{% endcompress %} -{% endblock %} +