{% extends "base.html" %}
{% load backend_tags %}
{% block content %}
{% with output=res.json %}
<h2>{{ output.result.ids.sla_name }}  Services</h2>
<ul>
  {% for si in  output.result.service_instances %}
  <li>{{ si.service_name }} 
    <a href="{% url "backend:service_status" %}?cmd={{ si.service_status_uri }}&section=status" class='text-decoration-none badge bg-primary'>status</a>
    <a href="{% url "backend:service_status" %}?cmd={{ si.service_uri }}&section=detail" class='text-decoration-none badge bg-primary'>detail</a>
  </li>
  {% endfor %}
</ul>
<h2>Verifiers</h2>
<ul>
{% for v in output.result.verifiers %}
<li><a href="{% url "backend:service_status" %}?cmd={{ v.verifier_uri }}" class="text-decoration">{{ v.verifier_name }}</a></li>
{% endfor %}
</ul>
{% endwith %}
  <p>
    <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
      Raw JSON
    </a>
  </p>
  <div class="collapse" id="collapseExample">
    <div class="card card-body">
      <pre>
        {{ res.json | pprint }}
      </pre>
    </div>
  </div>


{% endblock %}
