evolution_serveurs.html 27 lignes · 1541 octets
{% import "components/badge.html" as badge %}
{# E022-C4 — état des serveurs de l'installation (fragment #serveurs-evolution), sonde d'E-003 #}
<div id="serveurs-evolution" class="overflow-x-auto" tabindex="0" aria-label="État des serveurs" aria-live="polite">
  <table class="w-full text-sm text-foreground">
    <thead class="bg-muted text-left text-xs text-muted-foreground"><tr><th class="px-md py-sm">Serveur</th><th class="px-md py-sm">Accès</th><th class="px-md py-sm">Connexion</th></tr></thead>
    <tbody>
      {% for s in serveurs %}
      <tr class="border-b border-border align-top">
        <td class="px-md py-sm font-mono">{{ s.nom }}</td>
        <td class="px-md py-sm font-mono text-xs">{{ s.acces }}</td>
        <td class="px-md py-sm">
          {% if let Some(d) = s.diagnostic %}
            {% if d.ok %}{% call badge::badge("ok", "connexion vérifiée") %}{% endcall %}{% else %}{% call badge::badge("erreur", "échec") %}{% endcall %}{% endif %}
            <ul class="mt-xs flex flex-col gap-xxs text-xs">
              {% for (controle, ok, detail) in d.controles %}
              <li class="{% if *ok %}text-muted-foreground{% else %}text-error-ink{% endif %}"><span aria-hidden="true">{% if *ok %}✓{% else %}✕{% endif %}</span> {{ controle }} : {{ detail }}</li>
              {% endfor %}
            </ul>
          {% else %}
            {% call badge::badge("neutre", "non testé") %}{% endcall %}
          {% endif %}
        </td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>