add chunk limiter
This commit is contained in:
@@ -5,7 +5,10 @@
|
||||
{% block body %}
|
||||
<h1 class="h4 mb-3">Dashboard</h1>
|
||||
|
||||
<div class="card bg-black text-info border-secondary">
|
||||
{# ============================= #}
|
||||
{# USER + RESET CARD #}
|
||||
{# ============================= #}
|
||||
<div class="card bg-black text-info border-secondary mb-4">
|
||||
<div class="card-body">
|
||||
<div class="mb-2">
|
||||
<strong>User:</strong> {{ app.user.userIdentifier }}
|
||||
@@ -19,21 +22,66 @@
|
||||
<div class="text-light">
|
||||
<p class="fw-bold">Reset des Systems</p>
|
||||
<p>Unwiderruflicher Reset des gesamten Systems</p>
|
||||
{% for label, messages in app.flashes %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ label }} alert-{{ label}} fade show" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<form method="post" action="/admin/documents/reset" onsubmit="return resetSystem()">
|
||||
|
||||
<button type="submit" class="btn btn-outline-danger">Reset System</button>
|
||||
{% for label, messages in app.flashes %}
|
||||
{% for message in messages %}
|
||||
<div class="alert alert-{{ label }} fade show" role="alert">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<form method="post" action="/admin/documents/reset" onsubmit="return resetSystem()">
|
||||
<button type="submit" class="btn btn-outline-danger">
|
||||
Reset System
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ============================= #}
|
||||
{# KNOWLEDGE INDEX STATUS CARD #}
|
||||
{# ============================= #}
|
||||
{% set percent = chunkLimit > 0 ? (chunkCount / chunkLimit * 100)|round(1) : 0 %}
|
||||
|
||||
<div class="card bg-black text-light border-secondary">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="text-info mb-3">Knowledge Index</h5>
|
||||
|
||||
<div class="mb-2">
|
||||
<strong>Chunks:</strong>
|
||||
{{ chunkCount|number_format(0, ',', '.') }}
|
||||
/
|
||||
{{ chunkLimit|number_format(0, ',', '.') }}
|
||||
</div>
|
||||
|
||||
<div class="progress bg-dark" style="height: 18px;">
|
||||
<div
|
||||
class="progress-bar
|
||||
{% if chunkCount > 115000 %}
|
||||
bg-danger
|
||||
{% elseif chunkCount > 100000 %}
|
||||
bg-warning text-dark
|
||||
{% else %}
|
||||
bg-success
|
||||
{% endif %}
|
||||
"
|
||||
role="progressbar"
|
||||
style="width: {{ percent }}%;"
|
||||
>
|
||||
{{ percent }}%
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-2 small text-light">
|
||||
System ist für maximal 120.000 Chunks optimiert.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function resetSystem() {
|
||||
return confirm('Sind Sie sicher, dass Sie das gesamte System zurücksetzen möchten?');
|
||||
|
||||
Reference in New Issue
Block a user