{% load analysis_tags %}
<td class="date-api">
  <p>{{call.api}}</p>
  <time>{{call.time}}</time>
  {% if pid %}
    <a href="#" class="call-link" data-pid="{{pid}}" data-cid="{{cid}}">
      <span class="glyphicon glyphicon-circle-arrow-right"></span>
    </a>
  {% endif %}
</td>
<td>
  {% for key, value in call.arguments.items %}
    {% if value|is_dict %}
      {% for k, v in value.items %}
        <span class="grey">{{key}}.{{k}}:</span>
        <span class="mono">{{v}}</span>
        <br />
      {% endfor %}
    {% else %}
      <span class="grey">{{key}}:</span>
      {% if key in call.raw %}
        {% for v in value|ensurelist %}
          <pre>{{v}}</pre>
        {% endfor %}
      {% else %}
        {% for v in value|ensurelist %}
          <span class="mono">{{v}}</span>
        {% endfor %}
      {% endif %}
      {% if key in call.flags %}
        <span class="grey">({{ call.flags|get_item:key|ensurelist|join:", " }})</span>
      {% endif %}
      <br />
    {% endif %}
  {% endfor %}
</td>
<td>
    {% if call.status == true %}
        success
    {% elif call.status == false %}
        failed
    {% elif call.status %}
        {{ call.status }}
    {% endif %}
</td>
<td><span class="mono">{{call.return_value}}</span></td>
<td>
    {% if call.repeated %}
        {{call.repeated}}
        {% if call.repeated > 1 %}
            times
        {% else %}
            time
        {% endif %}
    {% else %}
        0
    {% endif %}
</td>
