{% extends "boards/base.html" %}
{% load staticfiles %}
{% load i18n %}

{% block javascript %}
    <script language="javascript" type="text/javascript" src="{% static "js/dashboard.js" %}"></script>
{% endblock javascript %}

{% block content %}
    {% for item in items %}
        {% if forloop.counter == 1 %}
            <div class="row-fluid">
        {% endif %}
        <div class="span2 service-info">
            <h5>
                <a href="{{ item.url }}" title="go to service" class="service_ico" target="_blank">
                    <i class="icon-eye-open"></i>
                </a>
                <a href="/show/{{ item.id }}" title="view details">{{ item.name }}</a>
            </h5>
            <p>
                {% trans "MIN" %}: {{ item.min_response_time }}s {% trans "MAX" %}: {{ item.max_response_time }}s {% trans "AVG" %}: {{ item.avg_response_time }}s
            </p>
            <p>
                {% block sla %}{% endblock sla %}
            </p>
            <span class="service-hist-wrap" sid="{{ item.id }}" data-have-problems="{{ item.have_problems}}"></span>
        </div>
        {% if forloop.counter|divisibleby:"6" or forloop.last %}
            {% if forloop.last %}
                </div>
            {% else %}
                </div><div class="row-fluid">
            {% endif %}
        {% endif %}
    {% endfor %}

    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            Base.reloadDashboard();
        });
    </script>
{% endblock content %}
