{% extends "isitup/base.html" %}

{% block title %}{{object}}{% endblock %}

{% block content %}

<h2>Service: {{object}}</h2>
<p><a class="btn right" href="{% url service-list %}" alt="Back to service list">Back to services</a></p>

<div class="span4">
<dl class="well">
	<dt>{{object.host}}</dt>
	{% if object.path %}<dd>Path: {{object.path}}</dd>{% endif %}
	<dd>Status: {{object.up}}</dd>
	<dd>Code: {{object.status_code}}</dd>
	<dd>Uptime: {{object.uptime}} days</dd>
	<dd>Uptime rate: {{object.uptime_rate|floatformat}}%</dd>
	<dd>Avg response: {{object.avg_response_time|floatformat:3}} seconds</dd>
</dl>


   <h4>Outages</h4>
   {% if object.past_outages %}
   <ul>
     {% for o in object.past_outages|dictsortreversed:"created" %}
     <li><a href="#">{{o.start|date:"F, M d"}} - {{o.response_code}}</a></li>
     {% endfor %}
   </ul>
   {% else %}
   <p>Yay, no outages here!</p>
   {% endif %}

   <hr />
   <p><a class="btn" href="{% url service-list %}" alt="Back to service list">Back to services</a></p>
</div>




{% endblock %}
