184 lines
7.2 KiB
Twig
184 lines
7.2 KiB
Twig
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}Admin{% endblock %}</title>
|
|
{% block stylesheets %}
|
|
<link href="/assets/styles/bootstrap.min.css" rel="stylesheet"/>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="/assets/styles/base.css">
|
|
|
|
<link rel="stylesheet" href="{{ asset('/assets/styles/admin-markdown.css') }}">
|
|
{% endblock %}
|
|
</head>
|
|
|
|
<body class="bg-dark text-light">
|
|
|
|
{# ============================= #}
|
|
{# Top Navigation #}
|
|
{# ============================= #}
|
|
|
|
<nav class="navbar navbar-dark bg-black border-bottom border-secondary px-3">
|
|
<span class="navbar-brand fw-semibold text-info">
|
|
mitho® RAG-System
|
|
</span>
|
|
|
|
<div class="ms-auto d-flex align-items-center gap-3">
|
|
{% if app.user %}
|
|
<span class="small text-light">
|
|
{{ app.user.userIdentifier }}
|
|
</span>
|
|
|
|
<a class="btn btn-sm btn-outline-light"
|
|
href="{{ path('admin_logout') }}">
|
|
Logout
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</nav>
|
|
|
|
{# ============================= #}
|
|
{# Layout Container #}
|
|
{# ============================= #}
|
|
|
|
<div class="container-fluid">
|
|
<div class="row flex-nowrap">
|
|
|
|
{# ============================= #}
|
|
{# Sidebar #}
|
|
{# ============================= #}
|
|
{% if app.user %}
|
|
<aside class="col-auto col-md-3 col-lg-2 bg-black border-end border-secondary min-vh-100 pt-3">
|
|
|
|
{% set route = app.request.attributes.get('_route') %}
|
|
|
|
<nav class="nav flex-column">
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_dashboard' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_dashboard') }}">
|
|
<i class="bi bi-hdd-rack"></i> Dashboard
|
|
</a>
|
|
|
|
<hr class="border-secondary">
|
|
|
|
<div class="text-info text-uppercase small mb-2">
|
|
RAG Dokumente & Wissen
|
|
</div>
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_document' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_documents') }}">
|
|
<i class="bi bi-card-list"></i> Dokumente
|
|
</a>
|
|
|
|
{# ------------------------- #}
|
|
{# Tags (Document Routing) #}
|
|
{# ------------------------- #}
|
|
<a class="nav-link text-light {% if route starts with 'admin_tags' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_tags_index') }}">
|
|
<i class="bi bi-tag-fill"></i> Tags
|
|
</a>
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_system_agent' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_system_agent') }}">
|
|
<i class="bi bi-body-text"></i> Wissensbasis (Chunk-Index)
|
|
</a>
|
|
|
|
<hr class="border-secondary">
|
|
|
|
<div class="text-info text-uppercase small mb-2">
|
|
RAG System-Profile
|
|
</div>
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_system_prompt' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_system_prompt') }}">
|
|
<i class="bi bi-chat-right-dots-fill"></i> System Prompt
|
|
</a>
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_ingest_profile' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_ingest_profile_list') }}">
|
|
<i class="bi bi-diagram-3-fill"></i> Indexierungsprofile (Ingest Profiles)
|
|
</a>
|
|
|
|
<hr class="border-secondary">
|
|
|
|
<div class="text-info text-uppercase small mb-2">
|
|
KI-Endpunkte
|
|
</div>
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_model_config' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_model_config_list') }}">
|
|
<i class="bi bi-motherboard-fill"></i> Modell-Generierung (Matrix Parameter)
|
|
</a>
|
|
<hr class="border-secondary">
|
|
<div class="text-info text-uppercase small mb-2">
|
|
System-Guiide
|
|
</div>
|
|
|
|
<a class="nav-link text-light {% if route starts with 'admin_model_config' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_guides_index') }}">
|
|
<i class="bi bi-collection"></i> How-To & Leitfäden
|
|
</a>
|
|
<hr class="border-secondary">
|
|
<div class="text-info text-uppercase small mb-2">
|
|
Logs
|
|
</div>
|
|
<a class="nav-link text-light {% if route starts with 'admin_job' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_jobs') }}">
|
|
<i class="bi bi-binoculars-fill"></i> Indexierungs-Log (Ingest Jobs)
|
|
</a>
|
|
<a class="nav-link text-light {% if route starts with 'admin_job' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_vector_log') }}">
|
|
<i class="bi bi-binoculars-fill"></i> Vector-Log Python
|
|
</a>
|
|
<a class="nav-link text-light {% if route starts with 'admin_job' %}active fw-bold{% endif %}"
|
|
href="{{ path('admin_system_logs_index') }}">
|
|
<i class="bi bi-binoculars-fill"></i> System-Logs
|
|
</a>
|
|
|
|
</nav>
|
|
</aside>
|
|
{% endif %}
|
|
{# ============================= #}
|
|
{# Main Content #}
|
|
{# ============================= #}
|
|
|
|
<main class="col py-4 px-4">
|
|
{% block body %}{% endblock %}
|
|
</main>
|
|
|
|
</div>
|
|
</div>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
const requiredFields = document.querySelectorAll(
|
|
'input[required], select[required], textarea[required]'
|
|
);
|
|
|
|
requiredFields.forEach(field => {
|
|
|
|
const wrapper = field.parentElement;
|
|
if (!wrapper) return;
|
|
|
|
// Suche Label im gleichen Container
|
|
const label = wrapper.querySelector('label');
|
|
if (!label) return;
|
|
|
|
// Nicht doppelt markieren
|
|
if (label.dataset.requiredMarked) return;
|
|
|
|
const star = document.createElement('span');
|
|
star.textContent = ' *';
|
|
star.style.color = '#dc3545';
|
|
star.style.marginLeft = '4px';
|
|
star.style.fontWeight = '600';
|
|
|
|
label.appendChild(star);
|
|
label.dataset.requiredMarked = 'true';
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |