203 lines
7.6 KiB
Twig
203 lines
7.6 KiB
Twig
{% extends 'admin/base.html.twig' %}
|
|
|
|
{% block title %}Indexierungsprofile{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1 class="h3">Indexierungsprofile</h1>
|
|
|
|
<a class="btn btn-sm btn-outline-info"
|
|
href="{{ path('admin_ingest_profile_create') }}">
|
|
Neues Profil anlegen
|
|
</a>
|
|
</div>
|
|
|
|
{# ============================= #}
|
|
{# Strukturstatus Alert #}
|
|
{# ============================= #}
|
|
|
|
{% if structureMismatch %}
|
|
<div class="alert alert-danger d-flex justify-content-between align-items-center">
|
|
<div>
|
|
<strong>Strukturabweichung erkannt.</strong>
|
|
Die aktuelle Indexstruktur entspricht nicht dem aktiven Profil.
|
|
Eine globale Neuindizierung ist erforderlich oder Sie haben kein indexiertes Dokument im System.
|
|
</div>
|
|
<a href="{{ path('admin_jobs') }}"
|
|
class="btn btn-sm btn-outline-danger">
|
|
Global Reindex starten
|
|
</a>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-success">
|
|
Die Indexstruktur entspricht dem aktiven Profil.
|
|
</div>
|
|
{% endif %}
|
|
|
|
{# ============================= #}
|
|
{# Profile Tabelle #}
|
|
{# ============================= #}
|
|
|
|
<div class="card bg-black border-secondary mb-5">
|
|
<div class="card-body p-0">
|
|
|
|
<table class="table table-dark table-striped table-hover align-middle mb-0">
|
|
<thead class="table-secondary text-dark">
|
|
<tr>
|
|
<th>Version</th>
|
|
<th>Chunk Size</th>
|
|
<th>Overlap</th>
|
|
<th>Embedding</th>
|
|
<th>Dim</th>
|
|
<th>Scoring</th>
|
|
<th>Status</th>
|
|
<th>Reindex</th>
|
|
<th class="text-end">Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for p in profiles %}
|
|
<tr>
|
|
<td>v{{ p.version }}</td>
|
|
<td>{{ p.chunkSize }}</td>
|
|
<td>{{ p.chunkOverlap }}</td>
|
|
<td>{{ p.embeddingModel }}</td>
|
|
<td>{{ p.embeddingDimension }}</td>
|
|
<td>{{ p.scoringVersion }}</td>
|
|
|
|
<td>
|
|
{% if p.active %}
|
|
<span class="badge bg-success">Aktiv</span>
|
|
{% else %}
|
|
<span class="badge bg-dark border border-secondary">
|
|
Inaktiv
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td>
|
|
{% if p.reindexRequired %}
|
|
<span class="badge bg-warning text-dark">
|
|
Erforderlich
|
|
</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">
|
|
Nein
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td class="text-end">
|
|
|
|
{% if not p.active and is_granted('ROLE_SUPER_ADMIN') %}
|
|
|
|
{# Aktivieren via POST #}
|
|
<form method="post"
|
|
action="{{ path('admin_ingest_profile_activate', {id: p.id}) }}"
|
|
class="d-inline"
|
|
onsubmit="return confirm('Profil aktivieren? Global Reindex kann erforderlich sein.');">
|
|
|
|
<input type="hidden"
|
|
name="_token"
|
|
value="{{ csrf_token('activate_ingest_profile_' ~ p.id) }}">
|
|
|
|
<button class="btn btn-sm btn-outline-success me-2">
|
|
Aktivieren
|
|
</button>
|
|
</form>
|
|
|
|
{# Löschen via POST #}
|
|
<form method="post"
|
|
action="{{ path('admin_ingest_profile_remove', {id: p.id}) }}"
|
|
class="d-inline"
|
|
onsubmit="return confirm('Profil wirklich löschen?');">
|
|
|
|
<input type="hidden"
|
|
name="_token"
|
|
value="{{ csrf_token('delete_ingest_profile_' ~ p.id) }}">
|
|
|
|
<button class="btn btn-sm btn-outline-danger">
|
|
Löschen
|
|
</button>
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="9" class="text-center text-secondary py-4">
|
|
Keine Profile vorhanden.
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{# ============================= #}
|
|
{# Struktur-Diff #}
|
|
{# ============================= #}
|
|
|
|
<div class="card bg-black border-secondary">
|
|
<div class="card-body">
|
|
|
|
<h5 class="text-info mb-3">Index-Struktur Vergleich</h5>
|
|
|
|
{% if indexMeta %}
|
|
<div class="mb-3 small text-secondary">
|
|
Aktuelle Index-Version:
|
|
<strong>{{ indexMeta.index_version }}</strong>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-warning">
|
|
index_meta.json nicht gefunden.
|
|
</div>
|
|
{% endif %}
|
|
|
|
<table class="table table-dark table-striped table-hover align-middle">
|
|
<thead class="table-secondary text-dark">
|
|
<tr>
|
|
<th>Parameter</th>
|
|
<th>Index Meta</th>
|
|
<th>Aktives Profil</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for key, row in diff %}
|
|
<tr>
|
|
<td>{{ key }}</td>
|
|
<td>{{ row.meta }}</td>
|
|
<td>{{ row.profile }}</td>
|
|
<td>
|
|
{% if row.equal %}
|
|
<span class="badge bg-success">Identisch</span>
|
|
{% else %}
|
|
<span class="badge bg-danger">Abweichung</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="4" class="text-center text-secondary py-4">
|
|
Keine Vergleichsdaten verfügbar.
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-4 small text-secondary">
|
|
Hinweis: Strukturänderungen (Chunking, Embedding, Scoring) führen zu
|
|
inkonsistentem Retrieval, bis eine vollständige Neuindizierung durchgeführt wird.
|
|
</div>
|
|
|
|
{% endblock %}
|