srv/poe_manager/templates/index.html aktualisiert
This commit is contained in:
@@ -7,44 +7,31 @@
|
|||||||
Nächste Prüfung in -- Sekunden
|
Nächste Prüfung in -- Sekunden
|
||||||
</span>
|
</span>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="container">
|
<div class="row g-3">
|
||||||
{% set current_prefix = None %}
|
|
||||||
<div class="row row-cols-1 row-cols-md-6 g-3">
|
|
||||||
{% for d in devices %}
|
{% for d in devices %}
|
||||||
{% set prefix = d[1][:3] %} {# die ersten 3 Buchstaben #}
|
<div class="col-6 col-md-4 col-lg-3 col-xl-2">
|
||||||
|
<div class="card text-center p-2"
|
||||||
{% if current_prefix != prefix %}
|
{% if last_seen.get(d[0]) %}
|
||||||
{% if not loop.first %}
|
title="{{ last_seen[d[0]] }}"
|
||||||
</div> {# vorige Reihe schließen #}
|
{% elif status[d[0]] == 'offline' %}
|
||||||
{% endif %}
|
title="Noch nie online"
|
||||||
<div class="row row-cols-1 row-cols-md-6 g-3"> {# neue Reihe starten #}
|
{% endif %}>
|
||||||
{% set current_prefix = prefix %}
|
<div class="card-header">{{ d[1] }}</div>
|
||||||
{% endif %}
|
<div class="card-body">
|
||||||
|
<span class="fw-bold" style="color:
|
||||||
<div class="col">
|
{% if d[2] == 0 %}gray
|
||||||
<div class="card text-center p-2"
|
{% elif status[d[0]] == 'online' %}green
|
||||||
{% if last_seen.get(d[0]) %} title="{{ last_seen[d[0]] }}"
|
{% else %}red
|
||||||
{% elif status[d[0]] == 'offline' %} title="Noch nie online" {% endif %}>
|
{% endif %};">
|
||||||
<div class="card-header">{{ d[1] }}</div>
|
{% if d[2] == 0 %}
|
||||||
<div class="card-body">
|
Deaktiviert
|
||||||
<span class="fw-bold" style="color:
|
{% else %}
|
||||||
{% if d[2] == 0 %}gray
|
{% if status[d[0]] %}{{ status[d[0]]|capitalize }}{% else %}Unbekannt{% endif %}
|
||||||
{% elif status[d[0]] == 'online' %}green
|
{% endif %}
|
||||||
{% else %}red
|
</span>
|
||||||
{% endif %};">
|
|
||||||
{% if d[2] == 0 %}
|
|
||||||
Deaktiviert
|
|
||||||
{% else %}
|
|
||||||
{% if status[d[0]] %}{{ status[d[0]]|capitalize }}{% else %}Unbekannt{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{% if loop.last %}
|
|
||||||
</div> {# letzte Reihe schließen #}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user