optimize ui
add new ki endpoint params
This commit is contained in:
@@ -1,94 +1,202 @@
|
||||
{% extends 'admin/base.html.twig' %}
|
||||
|
||||
{% block title %}Ingest Profiles{% endblock %}
|
||||
{% block title %}Indexierungsprofile{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Ingest Profiles</h1>
|
||||
<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">
|
||||
⚠ Strukturabweichung festgestellt – Globale Neuindizierung erforderlich | <a href="{{ path('admin_jobs') }}">Global Reindex aufrufen</a>
|
||||
<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.
|
||||
</div>
|
||||
<a href="{{ path('admin_jobs') }}"
|
||||
class="btn btn-sm btn-outline-light">
|
||||
Global Reindex starten
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-success">
|
||||
✅ Die Indexstruktur entspricht dem aktiven Profil
|
||||
Die Indexstruktur entspricht dem aktiven Profil.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<p><a class="btn btn-outline-light" href="{{ path('admin_ingest_profile_create') }}">+ Neues Profil anlegen</a></p>
|
||||
{# ============================= #}
|
||||
{# Profile Tabelle #}
|
||||
{# ============================= #}
|
||||
|
||||
<h2>Profiles</h2>
|
||||
<div class="card bg-black border-secondary mb-5">
|
||||
<div class="card-body p-0">
|
||||
|
||||
<table border="1" cellpadding="6" class="table table-sm table-dark align-middle">
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<th>Chunk Size</th>
|
||||
<th>Overlap</th>
|
||||
<th>Model</th>
|
||||
<th>Dimension</th>
|
||||
<th>Scoring</th>
|
||||
<th>Active</th>
|
||||
<th>Reindex Required</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<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>
|
||||
|
||||
{% for p in profiles %}
|
||||
<tr>
|
||||
<td {% if p.active %}class="text-success"{% endif %}>{{ 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 %}class="text-success"{% endif %}>{{ p.active ? 'Yes' : 'No' }}</td>
|
||||
<td>{{ p.reindexRequired ? 'Yes' : 'No' }}</td>
|
||||
<td>
|
||||
{% if not p.active %}
|
||||
<a class="btn btn-outline-success btn-sm" href="{{ path('admin_ingest_profile_activate', {id: p.id}) }}">
|
||||
Aktivieren
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if not p.active %}
|
||||
<a class="btn btn-outline-danger btn-sm" href="{{ path('admin_ingest_profile_remove', {id: p.id}) }}">
|
||||
Löschen
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<td>
|
||||
{% if p.active %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-dark border border-secondary">
|
||||
Inaktiv
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<hr>
|
||||
<h2>Index-Struktur-Profil Diff</h2>
|
||||
<td>
|
||||
{% if p.reindexRequired %}
|
||||
<span class="badge bg-warning text-dark">
|
||||
Erforderlich
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">
|
||||
Nein
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% if indexMeta %}
|
||||
<p><strong>Index Version:</strong> {{ indexMeta.index_version }}</p>
|
||||
{% else %}
|
||||
<p>No index_meta.json found.</p>
|
||||
{% endif %}
|
||||
<td class="text-end">
|
||||
|
||||
<table border="1" cellpadding="6" class="table table-sm table-dark align-middle">
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Index Meta</th>
|
||||
<th>Active Profile</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
{% if not p.active and is_granted('ROLE_SUPER_ADMIN') %}
|
||||
|
||||
{% for key, row in diff %}
|
||||
<tr>
|
||||
<td>{{ key }}</td>
|
||||
<td>{{ row.meta }}</td>
|
||||
<td>{{ row.profile }}</td>
|
||||
<td>
|
||||
{% if row.equal %}
|
||||
<span style="color:green;">✓</span>
|
||||
{% else %}
|
||||
<span style="color:red;">✗</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{# 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 %}
|
||||
|
||||
Reference in New Issue
Block a user