{% extends "base.html" %}
{% load backend_tags %}
{% block content %}
  <h2>Reports</h2>
  
  <a href="">Generate Report</a>
  <!-- 
    {{ sla | pprint }} -->
      {% for v in sla.result %}
      <div class='text-center'>
        <h2>{{ v.ids.sla_name  }}</h2><br>
        <div class='d-flex  text-center'>
          {% with services=sla_results|kv:v.ids.sla_name %}
          {% for si in services.result.service_instances %}
          <div class='text-center border p-3'>
            {{ si.service_instance_name }}<br>
            {% service_value service_results v.ids.sla_name si.service_name  as sv %}
            <div class='d-flex'>
              <div class='p-3'>
                <div class='d-flex'>
                  {% for tt in sv.test_templates %}
                  <div class='d-flex'>
                    {% for tt2 in tt.test_metric_templates %}
                      <div class='text-center border p-3'>{{ tt2.name }}</div>
                    {% endfor %}
                  </div>
                  {% endfor %} 
                </div>
              </div>
            </div>
          </div>
          {% endfor %}
          {% endwith %}
        </div>
      </div>
      {% endfor %}

 {% comment %}<pre>{% endcomment %}
 {% comment %}SLA Result{% endcomment %}
    {% comment %}{{ sla_results | pprint }}{% endcomment %}
 {% comment %}</pre>{% endcomment %}
 <pre>
Test Status
  {{ test_status | pprint }}
 </pre>
 <pre>
Service Results
  {{ service_results | pprint }}
 </pre>
{% endblock %}
