{% load i18n %}
{% load sentry_helpers %}

<div class="module">
    <div class="page-header">
        {% if not is_public %}
            <a href="{% url 'sentry-replay' event.team.slug event.project.slug event.group_id event.id %}" class="btn small pull-right">{% trans "Replay this request" %}</a>
        {% endif %}
        <h2>{% trans "Request" %}</h2>
    </div>
    <div class="module-content">
        <table class="table table-striped vars">
            <colgroup>
                <col style="width:130px;">
            </colgroup>
            <tbody>
                <tr>
                    <th>{% trans "URL:" %}</th>
                    <td><a href="{{ url }}{% if query_string %}?{{ query_string }}{% endif %}">{{ url }}</a></td>
                </tr>
                {% if method %}
                    <tr>
                        <th>{% trans "Method:" %}</th>
                        <td>{{ method }}</td>
                    </tr>
                {% endif %}
                <tr>
                    <th>{% trans "Query:" %}</th>
                    <td class="values">
                        <pre>{{ query_string }}</pre>
                    </td>
                </tr>
                {% if data %}
                    <tr>
                        <th>{% trans "Body:" %}</th>
                        <td class="values">
                            {% render_values data %}
                        </td>
                    </tr>
                {% endif %}
                {% if cookies %}
                    <tr>
                        <th>{% trans "Cookies:" %}</th>
                        <td class="values">
                            {% render_values cookies %}
                        </td>
                    </tr>
                {% endif %}
                {% if headers %}
                    <tr>
                        <th>{% trans "Headers:" %}</th>
                        <td class="values">
                            {% render_values headers %}
                        </td>
                    </tr>
                {% endif %}
                {% if env %}
                    <tr>
                        <th>{% trans "Environment:" %}</th>
                        <td class="values">
                            {% render_values env %}
                        </td>
                    </tr>
                {% endif %}
            </tbody>
        </table>
    </div>
</div>
