{% extends "base.html" %} {% set active_page = "index" %} {% block page_title %}Dashboard{% endblock %} {% block page_sub %}
{{ device_count }} Geräte{{ " im Bestand" if current_user.is_authenticated else "" }}
{% endblock %} {% block topbar_right %}
Nächste Prüfung in --s {% endblock %} {% block content %}
Online
{{ stats.online }}
Offline
{{ stats.offline }}
{% if current_user.is_authenticated %}
Deaktiviert
{{ stats.disabled }}
{% endif %}
Gesamt
{{ stats.total }}
{% macro device_tile(d) %} {% set st = status.get(d['mac'], 'unbekannt') %}
{% if d['is_active'] == 0 %} Aus {% else %} {{ {'online':'Online','offline':'Offline','unbekannt':'Unbekannt'}[st] }} {% endif %}
{{ d['name'] }}
{{ d['rpi_ip'] }}
{% endmacro %} {% if device_count %} {% if offline_devices %}
Offline {{ offline_devices|length }}
{% for d in offline_devices %}{{ device_tile(d) }}{% endfor %}
{% endif %} {% if online_devices %}
Online {{ online_devices|length }}
{% for d in online_devices %}{{ device_tile(d) }}{% endfor %}
{% endif %} {% if disabled_devices %}
Deaktiviert {{ disabled_devices|length }}
{% for d in disabled_devices %}{{ device_tile(d) }}{% endfor %}
{% endif %} {% else %}
{% if current_user.is_authenticated %} Noch keine Geräte angelegt. Füge welche unter Devices hinzu. {% else %} Aktuell keine Geräte verfügbar. {% endif %}
{% endif %} {% if not current_user.is_authenticated %}

Nur Lese-Ansicht — deaktivierte Geräte werden nicht angezeigt. Anmelden, um alle Geräte zu verwalten oder einen PoE-Neustart auszulösen.

{% endif %} {% if current_user.is_authenticated %} {% if current_user.has_permission('devices.restart') %} {% endif %} {% endif %} {% endblock %} {% block scripts %} {% endblock %}