{% extends "base.html" %} {% from "_pagination.html" import pager %} {% block title %}📊 Video Storage Analytics{% endblock %} {% block content %}

📊 Video Storage Analytics

{% set next_user_dir = 'asc' if sort != 'user' or dir == 'desc' else 'desc' %} {% set next_platform_dir = 'asc' if sort != 'platform' or dir == 'desc' else 'desc' %} {% set next_total_dir = 'asc' if sort != 'total_size' or dir == 'desc' else 'desc' %} {% set next_count_dir = 'asc' if sort != 'video_count' or dir == 'desc' else 'desc' %} {% set next_avg_dir = 'asc' if sort != 'avg_size' or dir == 'desc' else 'desc' %} {% set next_last_dir = 'asc' if sort != 'last_online' or dir == 'desc' else 'desc' %} {% for key, stats in storage_usage %} {% set user, platform = key.split("::") %} {% endfor %}
User{% if sort=='user' %} {{ 'â–²' if dir=='asc' else 'â–¼' }}{% endif %} Platform{% if sort=='platform' %} {{ 'â–²' if dir=='asc' else 'â–¼' }}{% endif %} Total Storage (GB){% if sort=='total_size' %} {{ 'â–²' if dir=='asc' else 'â–¼' }}{% endif %} Video Count{% if sort=='video_count' %} {{ 'â–²' if dir=='asc' else 'â–¼' }}{% endif %} Avg Size per Video (GB){% if sort=='avg_size' %} {{ 'â–²' if dir=='asc' else 'â–¼' }}{% endif %} Last Online{% if sort=='last_online' %} {{ 'â–²' if dir=='asc' else 'â–¼' }}{% endif %}
{{ user }} {% set uname = user.lower() %} {% if uname in online_set %} {% elif uname in recording_offline_set %} {% else %} {% endif %} {{ platform }} {{ "%.2f"|format(stats.total_size) }} {{ stats.video_count }} {{ "%.2f"|format(avg_sizes[key]) }} {% if stats.last_online %} {{ stats.last_online.strftime('%Y-%m-%d') }} {% else %} — {% endif %}
{{ pager('web.dashboard', page, total_pages, q=query, sort=sort, dir=dir, timeframe=timeframe, start=start_str, end=end_str) }} {% endblock %} {% block scripts %} {% endblock %}