<!DOCTYPE html>
{% load staticfiles %}
<html>
<head>
    <link rel="icon" href="{% static 'favicon.ico' %}" type="image/x-icon">
    <title></title>
    <link href="https://yandex.st/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
    <link href="{% static 'css/navigation.css' %}" rel="stylesheet" />
    <link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet"/>
</head>
    <script src="https://yandex.st/jquery/2.0.3/jquery.min.js" type="text/javascript"></script>
    <script src="https://yandex.st/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
    <script type='text/javascript' src="{% static 'js/xmlhttp.js' %}"></script>
    <script type='text/javascript' src="{% static 'js/data_load.js' %}"></script>
<style>
    .btn-main-link {
        background-color: #7f6a7f;
    }
    .btn-main-link:after {
        border-left-color: #7f6a7f;
    }

    .nav-service-link {
        color: #768b92;
    }
</style>
{% include "navigation.html" %}
{% include "nav_ctype.html" %}
<body>
<div style="border-bottom: 2px solid grey">
    <button class="btn-main-link"><a href="{% url 'main' %}" class="main-link">SAAS</a></button>
    <span class="dropdown"><span class="page-title" data-toggle="dropdown">Docfetcher errors<span class="caret"></span></span>
        <ul id="nav-screens-menu" class="dropdown-menu">
            <li><a href="{% url 'deploy_page' %}?service={{ service }}&ctype={{ ctype }}">Cluster & deploy</a></li>
            <li><a href="{% url 'cluster_total' %}?service={{ service }}&ctype={{ ctype }}">Cluster hardware</a></li>
            <li><a href="{% url 'service_info' %}?service={{ service }}&ctype={{ ctype }}">Service conf</a></li>
            <li><a href="{% url 'monitor_hosts' %}?service={{ service }}&ctype={{ ctype }}">Monitor hosts</a></li>
            <li><a href="{% url 'monitor_gui' %}?service={{ service }}&ctype={{ ctype }}">Monitor</a></li>
        </ul></span>
    <span id="ctype_selector" style="font-weight:bold;color:#7f6a7f">{{ ctype }}</span><span class="caret"></span>
    <span class="nav-service-link" style="margin-left:10px;font-weight:bold;color:#478fcc">{{ service }}</span>
</div>
<table><tr><td id="nav-services-list" style="vertical-align: top">
</td><td style="vertical-align: top">
<div style='margin-left: 10%'>
    <h4 style='margin-left:5px'>Docfetcher errors ({{ df_meta.count }} kinds found)</h4>
{% for serv_errors in df_errors %}
{% for err in serv_errors.errors %}
    <div data-target='#{{ err.eid }}' data-toggle='collapse' style='background-color: #edfaf8;border-radius:3px;border:2px solid #c5e6e0;cursor:pointer;margin:5px'>
        {{ err.descr }}
        <span style='color:#708992;font-weight:bold'>count:{{ err.count }} last:{{ err.time_last_hr }}</span>
    </div>
    <div class='collapse' id='{{ err.eid }}' style='margin-left:30px; padding-left: 3px; border-left: 1px solid #c5e6e0'>errors: {{ err.docs|length }}
        {% for hdoc in err.docs %}
            <br>{{ hdoc.host }}<br>
            {% for doc in hdoc.docs %}
                <span style='color: #65998f;'>{{ doc.time_hr }}: </span>
                {{ doc.description }}<br>
            {% endfor %}

        {% endfor %}
    </div>
 {% endfor %}
 {% endfor %}

</div>
</td></tr></table>
</body>
</html>
