new layouts
This commit is contained in:
@@ -1,207 +1,213 @@
|
||||
{% extends 'admin/base.html.twig' %}
|
||||
|
||||
{% block title %}System Dashboard{% endblock %}
|
||||
{% block title %}System-Dashboard{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
{# ===================================================== #}
|
||||
{# HEADER #}
|
||||
{# ===================================================== #}
|
||||
<!-- ===================================================== -->
|
||||
<!-- HEADER -->
|
||||
<!-- ===================================================== -->
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1 class="h3 mb-0">System Overview</h1>
|
||||
<h1 class="h3 mb-0">Systemübersicht</h1>
|
||||
<span class="badge bg-secondary">RAG Enterprise</span>
|
||||
</div>
|
||||
|
||||
{# ===================================================== #}
|
||||
{# GOVERNANCE BLOCK #}
|
||||
{# ===================================================== #}
|
||||
<!-- ===================================================== -->
|
||||
<!-- KPI ROW -->
|
||||
<!-- ===================================================== -->
|
||||
|
||||
<div class="card bg-black border-secondary text-light mb-4">
|
||||
<div class="card-body">
|
||||
<div class="row g-4 mb-4">
|
||||
|
||||
<h5 class="text-info mb-3">System Governance</h5>
|
||||
{% if vectorHealth is defined %}
|
||||
{% set status = vectorHealth.status %}
|
||||
{% set badgeClass =
|
||||
status starts with 'OK'
|
||||
? 'bg-success'
|
||||
: (status == 'INCONSISTENT_MISSING_VECTOR'
|
||||
? 'bg-warning text-dark'
|
||||
: 'bg-danger')
|
||||
%}
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<strong>Current User:</strong><br>
|
||||
{{ app.user.userIdentifier }}
|
||||
</div>
|
||||
<!-- Vector Status -->
|
||||
<div class="col-lg-6 col-xl-4">
|
||||
<div class="card bg-black border-secondary text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="col-md-6">
|
||||
<strong>Roles:</strong><br>
|
||||
{{ app.user.roles|join(', ') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="small text-secondary mb-2">Vektor-Infrastruktur</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{# ===================================================== #}
|
||||
{# VECTOR INFRASTRUCTURE #}
|
||||
{# ===================================================== #}
|
||||
|
||||
{% if vectorHealth is defined %}
|
||||
|
||||
{% set status = vectorHealth.status %}
|
||||
|
||||
{% set badgeClass =
|
||||
status starts with 'OK'
|
||||
? 'bg-success'
|
||||
: (status == 'INCONSISTENT_MISSING_VECTOR'
|
||||
? 'bg-warning text-dark'
|
||||
: 'bg-danger')
|
||||
%}
|
||||
|
||||
<div class="card bg-black border-secondary text-light mb-4">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-info mb-3">Vector Infrastructure</h5>
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
<div class="col-md-4">
|
||||
<strong>Status</strong><br>
|
||||
{% if vectorHealth is defined %}
|
||||
<h4 class="mb-2">
|
||||
<span class="badge {{ badgeClass }}">
|
||||
{{ status }}
|
||||
{{ vectorHealth.status }}
|
||||
</span>
|
||||
</h4>
|
||||
|
||||
<div class="small text-secondary">
|
||||
NDJSON-Chunks: {{ vectorHealth.ndjson_chunk_count|number_format(0, ',', '.') }}
|
||||
<br>
|
||||
Vektor-Index-Chunks: {{ vectorHealth.vector_chunk_count|number_format(0, ',', '.') }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-secondary small">
|
||||
Keine Infrastrukturdaten verfügbar.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Knowledge Capacity -->
|
||||
{% set percent = chunkLimit > 0 ? (chunkCount / chunkLimit * 100)|round(1) : 0 %}
|
||||
|
||||
<div class="col-lg-6 col-xl-4">
|
||||
<div class="card bg-black border-secondary text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="small text-secondary mb-2">Wissenskapazität</div>
|
||||
|
||||
<h4 class="mb-2">
|
||||
{{ chunkCount|number_format(0, ',', '.') }}
|
||||
<span class="text-secondary small">
|
||||
/ {{ chunkLimit|number_format(0, ',', '.') }}
|
||||
</span>
|
||||
</h4>
|
||||
|
||||
<div class="progress bg-dark mb-2" style="height: 14px;">
|
||||
<div
|
||||
class="progress-bar
|
||||
{% if percent >= 95 %}
|
||||
bg-danger
|
||||
{% elseif percent >= 85 %}
|
||||
bg-warning text-dark
|
||||
{% else %}
|
||||
bg-success
|
||||
{% endif %}"
|
||||
style="width: {{ percent }}%;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<strong>NDJSON Chunks</strong><br>
|
||||
{{ vectorHealth.ndjson_chunk_count|number_format(0, ',', '.') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<strong>Vector Index Chunks</strong><br>
|
||||
{{ vectorHealth.vector_chunk_count|number_format(0, ',', '.') }}
|
||||
<div class="small text-secondary">
|
||||
{{ percent }} % ausgelastet
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% if status starts with 'OK' %}
|
||||
<div class="small text-success">
|
||||
Infrastructure is consistent.
|
||||
</div>
|
||||
{% elseif status == 'INCONSISTENT_MISSING_VECTOR' %}
|
||||
<div class="small text-warning">
|
||||
Vector index missing. Rebuild recommended.
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="small text-danger">
|
||||
Index inconsistency detected. Immediate review required.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
<!-- Governance Snapshot -->
|
||||
<div class="col-lg-6 col-xl-4">
|
||||
<div class="card bg-black border-secondary text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="small text-secondary mb-2">System-Governance</div>
|
||||
|
||||
{# ===================================================== #}
|
||||
{# KNOWLEDGE CAPACITY #}
|
||||
{# ===================================================== #}
|
||||
<div class="small">
|
||||
<strong>Benutzer</strong><br>
|
||||
{{ app.user.userIdentifier }}
|
||||
</div>
|
||||
|
||||
{% set percent = chunkLimit > 0 ? (chunkCount / chunkLimit * 100)|round(1) : 0 %}
|
||||
<div class="small mt-3">
|
||||
<strong>Rollen</strong><br>
|
||||
{{ app.user.roles|join(', ') }}
|
||||
</div>
|
||||
|
||||
<div class="card bg-black border-secondary text-light mb-4">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-info mb-3">Knowledge Capacity</h5>
|
||||
|
||||
<div class="mb-2">
|
||||
<strong>Chunks:</strong>
|
||||
{{ chunkCount|number_format(0, ',', '.') }}
|
||||
/
|
||||
{{ chunkLimit|number_format(0, ',', '.') }}
|
||||
</div>
|
||||
|
||||
<div class="progress bg-dark" style="height: 20px;">
|
||||
<div
|
||||
class="progress-bar
|
||||
{% if percent >= 95 %}
|
||||
bg-danger
|
||||
{% elseif percent >= 85 %}
|
||||
bg-warning text-dark
|
||||
{% else %}
|
||||
bg-success
|
||||
{% endif %}"
|
||||
role="progressbar"
|
||||
style="width: {{ percent }}%;"
|
||||
aria-valuenow="{{ percent }}"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
>
|
||||
{{ percent }}%
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 small text-secondary">
|
||||
System optimized for maximum
|
||||
{{ chunkLimit|number_format(0, ',', '.') }} chunks.
|
||||
{% if percent >= 95 %}
|
||||
<br><strong class="text-danger">Capacity limit nearly reached.</strong>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ===================================================== -->
|
||||
<!-- DETAIL ROW -->
|
||||
<!-- ===================================================== -->
|
||||
|
||||
{# ===================================================== #}
|
||||
{# CRITICAL OPERATIONS (SUPER ADMIN ONLY) #}
|
||||
{# ===================================================== #}
|
||||
<div class="row g-4">
|
||||
|
||||
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
||||
{% if vectorHealth is defined %}
|
||||
|
||||
<div class="card bg-black border-danger text-light">
|
||||
<div class="card-body">
|
||||
<!-- Vector Detail -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card bg-black border-secondary text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-danger mb-3">Critical Operations</h5>
|
||||
<h5 class="text-info mb-3">Details zur Vektor-Infrastruktur</h5>
|
||||
|
||||
<div class="small mb-3">
|
||||
Full system reset removes:
|
||||
<ul>
|
||||
<li>All documents & versions</li>
|
||||
<li>NDJSON index</li>
|
||||
<li>FAISS vector index</li>
|
||||
<li>All ingest jobs</li>
|
||||
</ul>
|
||||
<strong>This action is irreversible.</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="small text-secondary">NDJSON-Chunks</div>
|
||||
<div class="h5">
|
||||
{{ vectorHealth.ndjson_chunk_count|number_format(0, ',', '.') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for label, messages in app.flashes %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ label }}">
|
||||
{{ message }}
|
||||
<div class="col-6">
|
||||
<div class="small text-secondary">Vektor-Index-Chunks</div>
|
||||
<div class="h5">
|
||||
{{ vectorHealth.vector_chunk_count|number_format(0, ',', '.') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<form method="post"
|
||||
action="{{ path('admin_document_reset') }}"
|
||||
onsubmit="return confirm('Confirm full system reset? This cannot be undone.');">
|
||||
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('system_reset') }}">
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-outline-danger">
|
||||
Execute Full System Reset
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
||||
|
||||
<!-- Critical Operations -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card bg-black border-danger text-light h-100">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-danger mb-3">Kritische Systemoperationen</h5>
|
||||
|
||||
<div class="small mb-3 text-secondary">
|
||||
Ein vollständiger System-Reset entfernt:
|
||||
<ul>
|
||||
<li>Alle Dokumente und Versionen</li>
|
||||
<li>Den NDJSON-Index</li>
|
||||
<li>Den FAISS-Vektorindex</li>
|
||||
<li>Alle Ingest-Jobs</li>
|
||||
</ul>
|
||||
<strong>Diese Aktion ist nicht rückgängig zu machen.</strong>
|
||||
</div>
|
||||
|
||||
{% for label, messages in app.flashes %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ label }}">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<form method="post"
|
||||
action="{{ path('admin_document_reset') }}"
|
||||
onsubmit="return confirm('System vollständig zurücksetzen? Diese Aktion kann nicht rückgängig gemacht werden.');">
|
||||
|
||||
<input type="hidden"
|
||||
name="_token"
|
||||
value="{{ csrf_token('system_reset') }}">
|
||||
|
||||
<button type="submit"
|
||||
class="btn btn-outline-danger">
|
||||
Vollständigen System-Reset ausführen
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user