{% extends "sentry/bases/admin.html" %}

{% block admin-nav-status %} class="active"{% endblock %}

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

{% block title %}{% trans "Server Status" %} | {{ block.super }}{% endblock %}

{% block inner %}
    <div class="page-header">
        <h2>{% trans "Environment" %}</h2>
    </div>
    {% if environment %}
        <table class="table table-bordered table-striped">
            <colgroup>
                <col style="width:220px">
            </colgroup>
            <tbody>
                <tr>
                    <th>{% trans "Server Version" %}</th>
                    <td class="code">{{ sentry_version.current }} {% if sentry_version.update_available %}<a href="#" title="You're running a year old version of Sentry, did you know {{ sentry_version.latest }} is available?" class="tip icon-circle-arrow-up">&nbsp;</a>{% endif %}</td>
                </tr>
                <tr>
                    <th>{% trans "Python Version" %}</th>
                    <td class="code">{{ python_version }}</td>
                </tr>
                <tr>
                    <th>{% trans "Configuration File" %}</th>
                    <td class="code">{{ environment.config }}</td>
                </tr>
                <tr>
                    <th>{% trans "Uptime" %}</th>
                    <td class="code">{{ environment.start_date|timesince }} (since {{ environment.start_date|date }})</td>
                </tr>
            </tbody>
        </table>
    {% else %}
        <p>{% trans "Environment not found (are you using the builtin Sentry webserver?)." %}</p>
    {% endif %}

    <div class="page-header">
        <h2>{% trans "Configuration" %}{% if environment.config %} <small>{{ environment.config }}</small>{% endif %}</h2>
    </div>
    <table class="table table-bordered table-striped">
        <colgroup>
            <col style="width:220px">
        </colgroup>
        <tbody>
            {% for key, value in config %}
                <tr>
                    <th>{{ key }}</th>
                    <td class="code"><pre>{{ value|pprint }}</pre></td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}
