{% extends "documentation/base.tera" %}

{% block title %}{{ i18n.labels.title_server_summary }}{% endblock title %}

{% block toc %}
## {{ i18n.labels.table_of_contents }}

- [{{ i18n.labels.overview }}](#overview)
{% if doc.routes %}
- [{{ i18n.labels.routes }}](#routes)
{% endif %}
{% if doc.components %}
- [{{ i18n.labels.components }}](#components)
{% endif %}
{% if doc.pages %}
- [{{ i18n.labels.pages }}](#pages)
{% endif %}
- [{{ i18n.labels.summary }}](#statistics)

{% endblock toc %}

{% block content %}

## {{ i18n.labels.overview }} {% raw %}{#overview}{% endraw %}

{% include "partials/metrics_summary.tera" %}

{% if doc.routes %}
## {{ i18n.labels.routes }} {% raw %}{#routes}{% endraw %}

{% include "partials/route_table.tera" %}

**Quick Navigation:**
{% for route in doc.routes %}
- [{{ route.path }}](reference.md#{{ route.anchor }})
{% endfor %}
{% endif %}

{% if doc.components %}
## {{ i18n.labels.components }} {% raw %}{#components}{% endraw %}

| {{ i18n.labels.components }} | Type | {{ i18n.labels.module }} |
|---|---|---|
{% for component in doc.components %}
| [{{ component.name }}](reference.md#{{ component.anchor }}) | {{ component.component_type }} | `{{ component.module_path }}` |
{% endfor %}
{% endif %}

{% if doc.pages %}
## {{ i18n.labels.pages }} {% raw %}{#pages}{% endraw %}

### {{ i18n.labels.languages | upper }}

{% for page in doc.pages %}
- [{{ page.path }}](reference.md#{{ page.anchor }}) ({{ page.language | upper }}) - {{ page.component }}
{% endfor %}
{% endif %}

## {{ i18n.labels.summary }} {% raw %}{#statistics}{% endraw %}

| Metric | Count |
|---|---|
| {{ i18n.labels.total_routes }} | {{ summary.total_routes }} |
| {{ i18n.labels.total_components }} | {{ summary.total_components }} |
| {{ i18n.labels.total_pages }} | {{ summary.total_pages }} |
| {{ i18n.labels.auth_required }} | {{ summary.auth_required_routes }} |
| {{ i18n.labels.static_routes }} | {{ summary.static_routes }} |
| {{ i18n.labels.api_routes }} | {{ summary.api_routes }} |
| {{ i18n.labels.languages }} | {{ summary.languages | join(sep=", ") }} |

{% endblock content %}
