{% extends "esistatus/base.html" %}

{% load i18n %}
{% load esistatus %}

{% block aa_esistatus_header %}
    {% translate "ESI Status" as translated_header %}
    {% include "esistatus/partials/header/page-header.html" with header_text=translated_header %}
{% endblock %}

{% block aa_esistatus_body %}
    <div class="row">
        {% if has_status_result %}
            {% translate "Red Endpoints" as translated_header_red %}
            {% include 'esistatus/partials/endpoints.html' with title=translated_header_red status="red" data=esi_endpoint_status.red %}

            {% translate "Yellow Endpoints" as translated_header_yellow %}
            {% include 'esistatus/partials/endpoints.html' with title=translated_header_yellow status="yellow" data=esi_endpoint_status.yellow %}

            {% translate "Green Endpoints" as translated_header_green %}
            {% include 'esistatus/partials/endpoints.html' with title=translated_header_green status="green" data=esi_endpoint_status.green %}
        {% else %}
            <div class="col-12">
                <p class="alert alert-warning text-center">
                    {% translate "Couldn't read the ESI status. Please try and reload the page. If that doesn't help, it is possible that ESI might be down entirely." %}
                </p>
            </div>
        {% endif %}
    </div>
{% endblock %}

{% block extra_css %}
    <link rel="stylesheet" href="{% esistatus_static 'esistatus/css/esistatus.min.css' %}">
{% endblock %}
