optimize gui loader

This commit is contained in:
team2
2026-02-23 20:55:13 +01:00
parent c047c401df
commit 0aff4d5f3b
3 changed files with 34 additions and 29 deletions

View File

@@ -11,12 +11,20 @@
{# ========================================================= #}
{# Flash Messages #}
{# ========================================================= #}
{% for message in app.flashes('success') %}
<div class="alert alert-success shadow-sm">{{ message }}</div>
{% endfor %}
{% for message in app.flashes('danger') %}
<div class="alert alert-danger shadow-sm">{{ message }}</div>
{% endfor %}
{#{% if app.flashes('success') %}
<ul class="alert alert-success shadow-sm">
{% for message in app.flashes('success') %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% if app.flashes('danger') %}
<ul class="alert alert-danger shadow-sm">
{% for message in app.flashes('danger') %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}#}
{# ========================================================= #}
{# LIVE REBUILD STATUS (SSE) #}
@@ -44,34 +52,28 @@
html = `
<div class="alert alert-info shadow-sm d-flex justify-content-between align-items-center">
<div>
<strong>Rebuild läuft</strong><br>
<strong>Tag-Rebuild läuft</strong><br>
${data.startedAt ? 'Gestartet: ' + new Date(data.startedAt).toLocaleString() : ''}
</div>
<div class="spinner-border spinner-border-sm"></div>
</div>
`;
}
else if (data.status === '{{ statusQueued }}') {
} else if (data.status === '{{ statusQueued }}') {
html = `
<div class="alert alert-secondary shadow-sm">
<strong>Rebuild in Warteschlange</strong>
<strong>Tag-Rebuild in Warteschlange</strong>
</div>
`;
}
else if (data.status === '{{ statusCompleted }}') {
} else if (data.status === '{{ statusCompleted }}') {
html = `
<div class="alert alert-success shadow-sm">
<strong>Rebuild erfolgreich abgeschlossen</strong>
<strong>Tag-Rebuild erfolgreich abgeschlossen</strong>
</div>
`;
}
else if (data.status === '{{ statusFailed }}') {
} else if (data.status === '{{ statusFailed }}') {
html = `
<div class="alert alert-danger shadow-sm">
<strong>Rebuild fehlgeschlagen</strong><br>
<strong>Tag-Rebuild fehlgeschlagen</strong><br>
${data.error ? '<code>' + data.error + '</code>' : ''}
</div>
`;
@@ -100,7 +102,7 @@
<input class="form-control form-control-sm"
name="label"
placeholder="z. B. Testomat 808"
required />
required/>
</div>
<div class="col-md-3">
@@ -108,14 +110,14 @@
<input class="form-control form-control-sm"
name="slug"
placeholder="z. B. testomat-808"
required />
required/>
</div>
<div class="col-md-4">
<label class="form-label small text-muted">Beschreibung</label>
<input class="form-control form-control-sm"
name="description"
placeholder="Optional" />
placeholder="Optional"/>
</div>
<div class="col-md-2 d-grid align-items-end">