{% extends "hq/base.html" %} {% load static i18n hq %} {% block title %}{{ title|default:_("Console") }}{% endblock %} {% block heading %}{{ title|default:_("Console") }}{% endblock %} {% block module_css %}{% endblock %} {% block actions %} {% comment %} A format switch rather than a disclosure: the same facts are either laid out as panels or printed as the JSON an API reader would get, never both at once. The two are siblings so the button can simply swap which is on. {% endcomment %}
{% translate "Open endpoint" %}{% hq_icon "external-link" %}
{% endblock %} {% block content %}
{% comment %} The strip is the console's; modules fill it in the order they are listed. The environment leads because it is context for everything below it -- you want to know you are looking at production before you read anything else. {% endcomment %} {% if environment or tiles %}
{% if environment %}
{% translate "Environment" %}
{{ environment }}
{% endif %} {% for tile in tiles %}
{{ tile.label }}
{% if tile.value and tile.url %} {{ tile.value }}{% hq_icon "external-link" %} {% else %} {{ tile.value|default:"—" }} {% endif %}
{% endfor %}
{% endif %} {% comment %} Each panel is already rendered, with its own context and nothing else. The slot carries only the width, so two consecutive half-width panels sit side by side and the packing stays CSS's problem rather than this template's. {% endcomment %}
{% for panel in panels %}
{{ panel.html }}
{% empty %}

{% hq_icon "info" %} {% translate "No console modules are configured." %}

{% endfor %}
{% comment %} The same facts, in the shape a script would get them. Fetched rather than rendered inline so what you read is genuinely the endpoint's answer — if the JSON ever disagreed with the panels, this is where it would show. {% endcomment %} {% endblock %} {% block scripts %}{% endblock %}