execution_fin.html 27 lignes · 2357 octets
{% import "components/bouton.html" as b %}
{% match statut %}
{% when StatutExecution::Reussie %}
<div class="border-l-4 border-l-success bg-success-bg p-md text-sm text-foreground" role="status">
  <p>✓ {% if let Some(o) = operation %}{{ o.reussie }}{% else if evolution %}Évolution terminée avec succès.{% else %}Installation terminée avec succès.{% endif %}</p>
  <a href="/install/resultat" class="mt-xs inline-block text-primary underline-offset-4 hover:underline">Voir le résultat</a>
  <span hx-get="/install/execution/suite" hx-trigger="load delay:2s" hx-swap="none"></span>
</div>
{% when StatutExecution::Echouee %}
<div class="border-l-4 border-l-error bg-error-bg p-md text-sm text-foreground" role="alert">
  <p>✕ {% if let Some(o) = operation %}{{ o.echouee }}{% else if evolution %}L'évolution a échoué.{% else %}L'installation a échoué.{% endif %}</p>
  {% if let Some(m) = message %}<p class="mt-xs whitespace-pre-wrap font-mono text-xs">{{ m }}</p>{% endif %}
  <p class="mt-xs">Corrigez la cause indiquée, puis relancez : l'installation reprend sans risque, les étapes déjà faites ne sont pas refaites.</p>
  <div class="mt-md flex flex-wrap gap-sm">
    <button type="button" class="{% call b::classes("default") %}{% endcall %}" hx-post="{% if let Some(o) = operation %}{{ o.relance }}{% else %}/install/execution{% endif %}" hx-swap="none" hx-disabled-elt="this">Relancer</button>
    {% if operation.is_none() %}<a href="/install/recapitulatif" class="{% call b::classes("outline") %}{% endcall %}">Modifier la configuration</a>{% endif %}
  </div>
</div>
{% when _ %}
<div class="border-l-4 border-l-warning bg-warning-bg p-md text-sm text-foreground" role="status">
  <p>{% if let Some(o) = operation %}{{ o.interrompue }}{% else if evolution %}Évolution interrompue.{% else %}Installation interrompue.{% endif %}</p>
  {% if let Some(m) = message %}<p class="mt-xs">{{ m }}</p>{% endif %}
  <button type="button" class="{% call b::classes("default") %}{% endcall %} mt-md" hx-post="{% if let Some(o) = operation %}{{ o.relance }}{% else %}/install/execution{% endif %}" hx-swap="none" hx-disabled-elt="this">Relancer</button>
</div>
{% endmatch %}
{# Événement SSE « fin » (OI-166) : plus rien à interrompre, bloc vidé hors bande #}
{% if oob %}<div id="interruption" hx-swap-oob="true"></div>{% endif %}