bienvenue.html 60 lignes · 3957 octets
{% extends "layouts/assistant.html" %}
{% import "components/bouton.html" as b %}
{% import "components/modal.html" as modal %}

{% block title %}Installer Open IAM{% endblock %}

{% block content %}
{# E-001 Bienvenue / reprise #}
<h1 class="text-3xl text-foreground">Installer Open IAM</h1>
<p class="mt-md max-w-3xl text-base text-muted-foreground">
  Cet assistant installe, sur les serveurs de votre choix, un annuaire OpenLDAP (LDAP Tool Box) durci, avec ses sauvegardes chiffrées.
  Selon vos choix, il y ajoute les outils web LDAP Tool Box, la supervision, l'authentification unique (LemonLDAP::NG), la migration depuis Active Directory et l'accès des postes Linux et Windows.
</p>

{% if let Some(reprise) = reprise %}
<section class="mt-xl rounded-sm border border-card-border bg-background p-xl" aria-labelledby="titre-reprise">
  <h2 id="titre-reprise" class="text-md text-title-ink">Installation en préparation pour {{ reprise.organisation }}</h2>
  <p class="mt-xs text-sm text-muted-foreground">Dernière modification le {{ reprise.modifie_le }}.</p>
  <div class="mt-md flex flex-wrap gap-sm">
    <a href="{{ reprise.url }}" class="{% call b::classes("default") %}{% endcall %}">Reprendre</a>
    <button type="button" class="{% call b::classes("outline") %}{% endcall %}"
            x-data="ouvreDialogue" data-dialogue="confirm-recommencer" x-on:click="ouvrir">Recommencer</button>
  </div>
  <dialog id="confirm-recommencer" role="alertdialog" aria-labelledby="confirm-recommencer-titre"
          aria-describedby="confirm-recommencer-texte" class="{% call modal::classes_dialogue() %}{% endcall %}">
    {% call modal::entete("confirm-recommencer", "Supprimer le brouillon ?") %}{% endcall %}
    <p id="confirm-recommencer-texte" class="mt-md text-base text-muted-foreground">Le brouillon sera supprimé, y compris les mots de passe saisis.</p>
    <div class="mt-xl flex justify-end gap-sm">
      <form method="dialog"><button class="{% call b::classes("outline") %}{% endcall %}" autofocus>Annuler</button></form>
      <button type="button" class="{% call b::classes("destructive") %}{% endcall %}" hx-delete="/install/brouillon" hx-swap="none">Supprimer le brouillon</button>
    </div>
  </dialog>
</section>
{% endif %}

<section class="mt-xxl" aria-labelledby="titre-prerequis">
  {% if root %}
  <h2 id="titre-prerequis" class="text-lg text-foreground">Vérification du serveur</h2>
  {% else %}
  <h2 id="titre-prerequis" class="text-lg text-foreground">Vérification de ce poste</h2>
  <p class="mt-xs max-w-3xl text-sm text-muted-foreground">Ce poste pilote l'installation : il lui faut Ansible et un client SSH. Les serveurs, joints en SSH, sont vérifiés à l'étape « Mode et cibles » puis avant le lancement. Pour tout installer sur cette machine, relancez l'installeur en root.</p>
  {% endif %}
  <div id="prerequis" class="mt-md" hx-get="/install/prerequis" hx-trigger="load" hx-swap="innerHTML">
    <ul class="flex flex-col gap-xs" aria-busy="true" aria-label="Vérification en cours">
      {% for _ in 0..self.lignes_attendues() %}<li class="h-8 animate-pulse rounded-xs bg-muted"></li>{% endfor %}
    </ul>
  </div>
</section>

<section class="mt-xxl rounded-sm bg-muted p-md" aria-labelledby="titre-import">
  <h2 id="titre-import" class="text-md text-title-ink">Reprendre une configuration existante</h2>
  <p class="mt-xs text-sm text-graphite">Importez le fichier openiam.yaml d'une installation précédente : les mots de passe seront à ressaisir.</p>
  <form class="mt-md flex flex-col gap-sm" hx-post="/install/import" hx-encoding="multipart/form-data"
        hx-target="#import-resultat" hx-swap="innerHTML" hx-trigger="change">
    <label for="fichier" class="text-sm text-foreground">Fichier openiam.yaml</label>
    <input id="fichier" name="fichier" type="file" accept=".yaml,.yml" class="text-sm text-foreground">
    <div id="import-resultat"></div>
  </form>
</section>
{% endblock %}