{% extends "base.html" %} {% block title %}Health Check - Panel Admina{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
Powrót do Status systemu

🏥 Health Check Dashboard

Ostatnia aktualizacja: {{ generated_at|local_time('%H:%M:%S') }} Auto-refresh: 2:00
{% if summary.overall_status == 'ok' %} ✅ {% elif summary.overall_status == 'degraded' %} ⚠️ {% else %} 🚨 {% endif %}

{% if summary.overall_status == 'ok' %} Wszystkie systemy działają poprawnie {% elif summary.overall_status == 'degraded' %} System działa z ograniczeniami {% else %} Wykryto krytyczne problemy! {% endif %}

{{ summary.health_percent }}% endpointów odpowiada poprawnie | Średni czas odpowiedzi: {{ summary.avg_response_time }}ms

{{ summary.ok }} OK
{{ summary.warning }} Ostrzeżenia
{{ summary.error }} Błędy
{% for cat_id, category in categories.items() %} {% if category.endpoints %}
{{ category.icon }}

{{ category.name }}

{{ category.endpoints|length }} endpoint{{ 'ów' if category.endpoints|length > 1 else '' }}
{% for ep in category.endpoints %}
{% if ep.status == 'ok' %}✓{% elif ep.status == 'warning' %}!{% else %}✗{% endif %}
{{ ep.name }}
{{ ep.path }}
{{ ep.status_code }} {% if ep.response_time %} {{ ep.response_time }}ms {% endif %}
{% endfor %}
{% endif %} {% endfor %}

Legenda kodów HTTP:

200 OK - strona działa
302 Redirect - przekierowanie (np. do logowania)
429 Rate Limited - ochrona przed botami (działa!)
403 Forbidden - brak uprawnień
404 Not Found - strona nie istnieje
500 Server Error - błąd serwera
{% endblock %} {% block extra_js %} // Auto-refresh every 2 minutes let countdownSeconds = 120; let isRefreshing = false; function updateCountdown() { if (isRefreshing) return; const minutes = Math.floor(countdownSeconds / 60); const seconds = countdownSeconds % 60; document.getElementById('countdown').textContent = `${minutes}:${seconds.toString().padStart(2, '0')}`; countdownSeconds--; if (countdownSeconds < 0) { refreshNow(); countdownSeconds = 120; } } async function refreshNow() { if (isRefreshing) return; isRefreshing = true; const btn = document.getElementById('refresh-btn'); const icon = document.getElementById('refresh-icon'); btn.disabled = true; icon.classList.add('spinning'); try { // Just reload the page for simplicity - the full check takes some time anyway window.location.reload(); } catch (error) { console.error('Refresh failed:', error); isRefreshing = false; btn.disabled = false; icon.classList.remove('spinning'); } } // Start countdown setInterval(updateCountdown, 1000); {% endblock %}