feat: affichage des référentiels intégrés dans la page admin RAG

Ajout d'une section listant les 6 sources built-in (CIM-10, CCAM, Guide Métho,
dictionnaires) avec compteurs de chunks et statut. Séparation claire entre
référentiels intégrés et référentiels utilisateur uploadés.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
dom
2026-02-13 19:00:44 +01:00
parent ee661dae1d
commit c838d75174
2 changed files with 92 additions and 4 deletions

View File

@@ -34,10 +34,56 @@
</p>
</div>
<!-- Tableau référentiels -->
<!-- Référentiels intégrés (built-in) -->
<div class="card" style="margin-bottom:1.5rem;">
<h3>Référentiels intégrés</h3>
<p style="font-size:0.8rem;color:#64748b;margin-bottom:0.75rem;">
Sources intégrées automatiquement dans l'index FAISS au build.
</p>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Fichier</th>
<th>Type</th>
<th>Taille</th>
<th>Chunks</th>
<th>Statut</th>
</tr>
</thead>
<tbody>
{% for ref in builtin_refs %}
<tr>
<td style="font-weight:600;">{{ ref.name }}</td>
<td style="font-size:0.8rem;color:#64748b;"><code>{{ ref.filename }}</code></td>
<td><span class="badge" style="background:#f1f5f9;color:#334155;">{{ ref.extension }}</span></td>
<td>{{ "%.1f"|format(ref.size_mb) }} Mo</td>
<td>
{% if ref.chunks %}
<strong>{{ ref.chunks }}</strong>
{% else %}
<span style="color:#94a3b8;"></span>
{% endif %}
</td>
<td>
{% if not ref.exists %}
<span class="badge" style="background:#fee2e2;color:#dc2626;">Fichier absent</span>
{% elif ref.chunks %}
<span class="badge" style="background:#dcfce7;color:#16a34a;">Indexé</span>
{% else %}
<span class="badge" style="background:#f1f5f9;color:#64748b;">Dictionnaire</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<!-- Tableau référentiels utilisateur -->
<div class="card">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:0.75rem;">
<h3>Référentiels indexés</h3>
<h3>Référentiels utilisateur</h3>
<button id="rebuild-btn"
style="padding:0.35rem 0.75rem;border-radius:6px;border:1px solid #e2e8f0;background:#fff;font-size:0.75rem;cursor:pointer;">
Rebuild complet