diff --git a/hc/front/views.py b/hc/front/views.py index 63f00e60..1fb886fc 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -336,8 +336,13 @@ def log(request, code): events = pings + list(alerts) events.sort(key=lambda el: el.created, reverse=True) + channels = Channel.objects.filter(user=request.team.user) + channels = list(channels.order_by("created")) + ctx = { "check": check, + "ping_endpoint": settings.PING_ENDPOINT, + "channels": channels, "events": events, "num_pings": min(num_pings, limit), "limit": limit, diff --git a/static/css/log.css b/static/css/log.css index 485d2062..2e4f6f9d 100644 --- a/static/css/log.css +++ b/static/css/log.css @@ -1,3 +1,74 @@ +#details-head h1 { + margin-bottom: 4px; +} + +#details-head { + margin-bottom: 24px; +} + +#details-head-actions { + text-align: right; + vertical-align: middle; + +} + +.details-block .status { + font-size: 32px; + width: 40px; +} + +.details-block { + margin-bottom: 36px; + border: 1px #aaa; + border-radius: 3px; +} + +.details-block code { + display: block; + padding: 8px; + margin-bottom: 8px; + background: #f5f5f5; +} + + +#details-status td { + padding: 8px; +} + +#log-schedule th { + padding-top: 4px; +} + +#details-integrations th { + width: 40px; + text-align: center; +} + +#log-schedule td { + padding: 4px 0 4px 8px; +} + +#log-schedule th { + vertical-align: top; + font-weight: normal; + text-align: right; +} + +#log-schedule .value { + font-weight: bold; +} + +#log-schedule .subtitle { + color: #999; +} + +#details-remove-check { + border-color: #d43f3a; + color: #d43f3a; + background: #FFF; +} + + #format-switcher-container:before { content: " "; } diff --git a/templates/front/log.html b/templates/front/log.html index a7f78bf6..5d61b981 100644 --- a/templates/front/log.html +++ b/templates/front/log.html @@ -7,28 +7,138 @@ {% block content %}
This is for monitoring our fancy backup script.
+The script runs on a $5 VM and sometimes runs out of memory and crashes. + If this happens, contact Ed and ask him to restart it.
+Keep this check up by making HTTP requests to this URL:
+{{ check.url }}
+ Or by sending emails to this address:
+{{ check.email }}
+ + + | ++ This check is down. Last ping was {{ check.last_ping|naturaltime }}. + | +
Period | +
+ {{ check.timeout|hc_duration }}
+
+ (Expected time between pings)
+
+ |
+
---|---|
Grace Time | +
+ {{ check.grace|hc_duration }}
+
+ (When a check is late, how long to wait until an alert is sent)
+
+ |
+
+ {% if channel in check.channel_set.all %} + ON + {% else %} + OFF + {% endif %} + | ++ + {{ channel }} + | +
---|
Permanently remove this check from your account.
+