{% load passerelle i18n tz %}
<div class="log-dialog" title="{{ logline.level_name }} - {{ logline.timestamp|localtime|date:'DATE_FORMAT' }} {{ logline.timestamp|localtime|time:"H:i:s" }}">
  <table>
    <tr>
      <td>{% trans 'Source IP' %}</td>
      <td>{{ logline.sourceip|default:"-" }}</td>
    </tr>
    <tr>
      <td>{% trans 'Message' %}</td>
      <td>{{ logline.message|censor }}</td>
    </tr>
    {% for key, value in logline.extra.items %}
      {% if key != 'transaction_id' %}
        <tr>
          <td>{{key}}</td>
          <td>{% for key2, value2 in value.items %}
            {{key2}}: {{value2|censor}}<br>
          {% empty %}
            {% with val=value|censor %}
              {% if '_url' in key %}
                <a href="{{val}}">{{val}}</a>
              {% else %}
                {{val|linebreaksbr}}
              {% endif %}
            {% endwith %}
          {% endfor %}</td>
        </tr>
      {% endif %}
    {% endfor %}
  </table>

  {% if logline.transaction_id %}
    <div class="buttons">
      <a class="button" href="{% url 'view-logs-connector' connector=object.get_connector_slug slug=object.slug %}?q={{logline.transaction_id}}">{% trans "Search for logs from the same call" %}</a>
    </div>
  {% endif %}

</div>
