{% from "./macros/request.html" import show_request %}

{% macro show_execution(item) %}
  <li class="accordion-item status-{{ item.status }}" data-accordion-item>
    <a href="#" class="accordion-title">
      <span class="badge status-{{ item.status }}">{{ item.status }}</span>
      Execution
    </a>

    <div class="accordion-content" data-tab-content>
      {% if item.request %}
        {{ show_request(item.request) }}
      {% endif %}

      {% if not item.message %}
        No message.
      {% else %}
        <pre>{{ item.message }}</pre>
      {% endif %}
    </div>
  </li>
{% endmacro %}
