{% extends "base.html" %} {% block title %}Analityka Forum - Norda Biznes Partner{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

Analityka Forum

Statystyki, trendy i aktywnosc uzytkownikow

Moderacja Eksportuj CSV
{{ stats.total_topics }}
Tematow lacznie
+{{ stats.topics_this_month }} w tym miesiacu
{{ stats.total_replies }}
Odpowiedzi lacznie
+{{ stats.replies_this_month }} w tym miesiacu
{{ stats.active_users_7d }}
Aktywni (7 dni)
{{ stats.avg_response_time }}
Sredni czas odpowiedzi
do pierwszej odpowiedzi
{{ stats.unanswered_topics }}
Bez odpowiedzi
{{ stats.resolved_topics }}
Rozwiazanych

Aktywnosc w czasie
Tematy Odpowiedzi

Tematy bez odpowiedzi {{ unanswered_topics|length }}

{% if unanswered_topics %} {% for topic in unanswered_topics %} {% endfor %}
Tytul Kategoria Autor Data Oczekuje
{{ topic.title }} {{ category_labels.get(topic.category, 'Pytanie') }} {{ topic.author.name or topic.author.email.split('@')[0] }} {{ topic.created_at|local_time('%d.%m.%Y %H:%M') }} {{ topic.days_waiting }} dni
{% else %}

Wszystkie tematy maja odpowiedzi!

{% endif %}

Ranking uzytkownikow

{% if user_rankings %} {% for user in user_rankings %} {% endfor %}
# Uzytkownik Tematy Odpowiedzi Rozwiazania Reakcje Suma
{{ loop.index }}
{{ (user.name or user.email)[0]|upper }}
{{ user.topic_count }} {{ user.reply_count }} {{ user.solution_count }} {{ user.reaction_count }} {{ user.total_score }}
{% else %}

Brak danych o aktywnosci uzytkownikow

{% endif %}

Statystyki kategorii

{% for cat, count in category_stats.items() %}
{{ count }}
{{ category_labels.get(cat, cat) }}
{% endfor %}
{% endblock %} {% block extra_js %} const chartData = {{ chart_data|tojson|safe }}; // Activity Chart const ctx = document.getElementById('activityChart').getContext('2d'); new Chart(ctx, { type: 'line', data: { labels: chartData.labels, datasets: [ { label: 'Tematy', data: chartData.topics, borderColor: 'rgb(79, 70, 229)', backgroundColor: 'rgba(79, 70, 229, 0.1)', fill: true, tension: 0.4 }, { label: 'Odpowiedzi', data: chartData.replies, borderColor: 'rgb(34, 197, 94)', backgroundColor: 'rgba(34, 197, 94, 0.1)', fill: true, tension: 0.4 } ] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false }, tooltip: { mode: 'index', intersect: false } }, scales: { x: { grid: { display: false } }, y: { beginAtZero: true, ticks: { stepSize: 1 } } } } }); // Date range helpers function setDateRange(days) { const end = new Date(); const start = new Date(); start.setDate(start.getDate() - days); document.querySelector('input[name="start_date"]').value = formatDate(start); document.querySelector('input[name="end_date"]').value = formatDate(end); document.querySelector('form').submit(); } function formatDate(date) { return date.toISOString().split('T')[0]; } {% endblock %}