{% load silk_filters %}
<td class="silk-td silk-td--timestamp">
    <span>{{ silk_request.start_time | silk_full_datetime }}</span>
</td>
<td class="silk-td silk-td--method">
    <span class="silk-badge silk-badge--method silk-badge--{{ silk_request.method|lower }}">{{ silk_request.method }}</span>
</td>
<td class="silk-td silk-td--status">
    {% if silk_request.response.status_code %}
    <span class="silk-badge silk-badge--status
        {% with sc=silk_request.response.status_code %}
        {% if sc >= 500 %}silk-badge--status-5xx
        {% elif sc >= 400 %}silk-badge--status-4xx
        {% elif sc >= 300 %}silk-badge--status-3xx
        {% else %}silk-badge--status-2xx
        {% endif %}
        {% endwith %}">
        {{ silk_request.response.status_code }}
    </span>
    {% else %}
    <span class="silk-text-muted">—</span>
    {% endif %}
</td>
<td class="silk-td silk-td--path">{{ silk_request.path }}</td>
<td class="silk-td silk-td--numeric">
    <span class="silk-num {% if silk_request.time_taken >= 2000 %}silk-num--very-bad{% elif silk_request.time_taken >= 1000 %}silk-num--bad{% elif silk_request.time_taken >= 400 %}silk-num--ok{% elif silk_request.time_taken >= 100 %}silk-num--good{% else %}silk-num--very-good{% endif %}">
        {% if silk_request.time_taken >= 2000 %}<i data-lucide="alert-triangle" class="silk-icon silk-icon--sm"></i>{% endif %}
        {{ silk_request.time_taken|floatformat:"0" }}<span class="silk-unit">ms</span>
    </span>
</td>
<td class="silk-td silk-td--numeric">
    <span class="silk-num">{{ silk_request.time_spent_on_sql_queries|floatformat:"0" }}<span class="silk-unit">ms</span></span>
</td>
<td class="silk-td silk-td--numeric">
    <span class="silk-num {% if silk_request.num_sql_queries >= 50 %}silk-num--very-bad{% elif silk_request.num_sql_queries >= 20 %}silk-num--bad{% elif silk_request.num_sql_queries >= 10 %}silk-num--ok{% endif %}">
        {{ silk_request.num_sql_queries }}
    </span>
    {% if silk_request.has_n1 %}
    <span class="silk-n1-row-badge" title="N+1 query detected">
        <i data-lucide="alert-triangle" class="silk-icon silk-icon--sm"></i>
    </span>
    {% endif %}
</td>
