Improve sync feedback and dashboard layout
Add request counters to Radio 357 backfill logs, clarify RNŚ warnings, and refine responsive dashboard metrics and configuration layout.
This commit is contained in:
@@ -69,6 +69,9 @@
|
||||
.episode-title { font-size: 1.05rem; }
|
||||
.page-toolbar { border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.25rem; }
|
||||
.empty-state { color: var(--muted); padding: 2rem 0; }
|
||||
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
|
||||
.config-grid > div { min-width: 0; }
|
||||
.config-grid .form-label { display: block; min-height: 2.5em; line-height: 1.35; }
|
||||
@media (max-width: 767.98px) {
|
||||
.container { padding-left: 18px; padding-right: 18px; }
|
||||
.navbar .container { padding-left: 18px; padding-right: 18px; }
|
||||
|
||||
+19
-20
@@ -60,25 +60,20 @@
|
||||
<button class="btn btn-sm btn-outline-warning w-100" title="Wymuś nowe logowanie z API" onclick="return confirm('Czy na pewno chcesz wymusić nowe logowanie?')">Relogin</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form method="POST" action="/force-sync" class="m-0">
|
||||
<input type="hidden" name="csrf" value="{{ csrf_token }}">
|
||||
<input type="hidden" name="station" value="{{ st }}">
|
||||
<button class="btn btn-sm btn-light w-100" {% if status[st].status == 'W trakcie' %}disabled{% endif %}>
|
||||
{% if status[st].status == 'W trakcie' %}
|
||||
Pobieranie...
|
||||
{% else %}
|
||||
Sync
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% if status[st].status == 'W trakcie' %}
|
||||
<form method="POST" action="/stop-sync" class="m-0">
|
||||
<input type="hidden" name="csrf" value="{{ csrf_token }}">
|
||||
<input type="hidden" name="station" value="{{ st }}">
|
||||
<button class="btn btn-sm btn-outline-danger w-100" onclick="return confirm('Zatrzymać synchronizację?')">
|
||||
⏹ Stop
|
||||
<span aria-hidden="true">■</span> Stop
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form method="POST" action="/force-sync" class="m-0">
|
||||
<input type="hidden" name="csrf" value="{{ csrf_token }}">
|
||||
<input type="hidden" name="station" value="{{ st }}">
|
||||
<button class="btn btn-sm btn-light w-100">Sync</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,6 +95,10 @@
|
||||
<small>{{ error.last_seen.strftime('%Y-%m-%d %H:%M') }}</small>
|
||||
</div>
|
||||
<div class="mt-1">{{ error.message }}</div>
|
||||
{% if error.source == 'missing_player' and error.message.startswith('Audycja ') %}
|
||||
{% set program_slug = error.message.split(':', 1)[0].replace('Audycja ', '') %}
|
||||
<a class="small text-info" href="/episodes/rns/{{ program_slug }}">Otwórz odcinki audycji</a>
|
||||
{% endif %}
|
||||
<div class="d-flex justify-content-between align-items-center mt-2">
|
||||
<small class="text-warning">Powtórzenia: {{ error.occurrences }}</small>
|
||||
<form method="POST" action="/errors/{{ error.id }}/acknowledge" class="m-0">
|
||||
@@ -157,16 +156,16 @@
|
||||
<div class="mb-2">
|
||||
<input type="password" name="r357_password" class="form-control form-control-sm" placeholder="Hasło (zostaw puste aby nie zmieniać)">
|
||||
</div>
|
||||
<div class="row g-2 mb-4">
|
||||
<div class="col-4">
|
||||
<div class="config-grid mb-4">
|
||||
<div>
|
||||
<label class="form-label small text-muted m-0">Sync co (godzin)</label>
|
||||
<input type="number" name="r357_interval" class="form-control form-control-sm" value="{{ config.r357_interval or '6' }}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div>
|
||||
<label class="form-label small text-muted m-0">Max odcinków backfill</label>
|
||||
<input type="number" name="r357_limit" class="form-control form-control-sm" value="{{ config.r357_limit or '600' }}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div>
|
||||
<label class="form-label small text-muted m-0">Hard limit (all)</label>
|
||||
<input type="number" name="r357_hard_limit" class="form-control form-control-sm" value="{{ config.r357_hard_limit or '1000' }}">
|
||||
</div>
|
||||
@@ -179,16 +178,16 @@
|
||||
<div class="mb-2">
|
||||
<input type="password" name="rns_password" class="form-control form-control-sm" placeholder="Hasło (zostaw puste aby nie zmieniać)">
|
||||
</div>
|
||||
<div class="row g-2 mb-4">
|
||||
<div class="col-4">
|
||||
<div class="config-grid mb-4">
|
||||
<div>
|
||||
<label class="form-label small text-muted m-0">Sync co (godzin)</label>
|
||||
<input type="number" name="rns_interval" class="form-control form-control-sm" value="{{ config.rns_interval or '6' }}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div>
|
||||
<label class="form-label small text-muted m-0">Max stron backfill</label>
|
||||
<input type="number" name="rns_limit" class="form-control form-control-sm" value="{{ config.rns_limit or '50' }}">
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div>
|
||||
<label class="form-label small text-muted m-0">Hard limit (all)</label>
|
||||
<input type="number" name="rns_hard_limit" class="form-control form-control-sm" value="{{ config.rns_hard_limit or '500' }}">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user