Files
adminandClaude Opus 5.5 65734a7ed7 Dashboard: Geräte-Ampel oben, Admin zeigt Änderungen an der Plattform
Flotten-Gesundheit als Ampel (Zahlenkacheln Handeln/Beobachten/In
Ordnung, je Gerät ein Kästchen mit Tooltip und Link aufs Protokoll,
Liste der auffälligen Geräte mit Grund), Statusfarben aus der
Dataviz-Palette, immer mit Symbol und Text. Ersetzt Textlisten und den
Ring "Gerätezustand". Admin-Dashboard: "Änderungen an der Plattform"
(Deploy, Migration, Boot-Medium, Stände vorab/stabil) statt Agent-Läufen.
Braucht provisioning-server 844faa2 mit Migration 0071.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:25:47 +02:00

60 lines
2.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{# Ringdiagramme für die Dashboards (GUI-Runde 09.10.2026, Punkt 6).
Farben nach den Dataviz-Regeln: Kategorien in fester Reihenfolge (validiert
gegen Pico hell/dunkel), "Weitere" grau; Gerätezustand mit den reservierten
Statusfarben plus Symbol. Legende mit Zahl und Prozent - Farbe trägt nie
allein. Eine einzige Kategorie wird als Satz statt als Ring gezeigt. #}
{% macro ring(titel, teile, art="kategorie", einheit="Geräte") %}
{% set segmente = ring_segmente(teile) %}
{% set gesamt = segmente | sum(attribute="anzahl") %}
<article class="diagramm-karte">
<h4>{{ titel }}</h4>
{% if not segmente %}
<p><small>Noch keine Geräte.</small></p>
{% elif segmente | length == 1 and art == "kategorie" %}
<p class="diagramm-einzeln">Alle {{ gesamt }} {{ einheit }}:<br><strong>{{ segmente[0].name }}</strong></p>
{% else %}
<div class="diagramm-inhalt">
<svg viewBox="-60 -60 120 120" class="ring" role="img" aria-label="{{ titel }}: {% for s in segmente %}{{ s.name }} {{ s.anzahl }}{{ ', ' if not loop.last }}{% endfor %}">
{% for s in segmente %}
<path d="{{ s.pfad }}" class="{{ farbklasse(art, s.name, loop.index0) }}" fill-rule="evenodd">
<title>{{ s.name }}: {{ s.anzahl }} ({{ s.prozent }} %)</title>
</path>
{% endfor %}
<text x="0" y="4" class="ring-zahl">{{ gesamt }}</text>
<text x="0" y="18" class="ring-einheit">{{ einheit }}</text>
</svg>
<ul class="legende">
{% for s in segmente %}
<li>
<span class="legende-marke" aria-hidden="true"><span class="swatch {{ farbklasse(art, s.name, loop.index0) }}"></span>{% if art == "zustand" %}<span class="status-symbol">{{ status_symbol(s.name) }}</span>{% endif %}</span>
<span class="legende-name">{{ s.name }}</span>
<span class="legende-wert">{{ s.anzahl }} <small>({{ s.prozent }} %)</small></span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</article>
{% endmacro %}
{% macro farbklasse(art, name, index) -%}
{%- if art == "zustand" -%}
{{ {"in Ordnung": "f-gut", "Ressourcen knapp": "f-ernst", "noch nie gemeldet": "f-neutral"}.get(name, "f-warnung") }}
{%- elif name == "Weitere" -%}f-neutral
{%- elif name in ["ohne Installation", "ohne Workspace", "unbekannt"] -%}f-neutral-2
{%- else -%}f-{{ index + 1 }}{%- endif -%}
{%- endmacro %}
{% macro status_symbol(name) -%}
{{ {"in Ordnung": "✓", "Ressourcen knapp": "▲", "noch nie gemeldet": "–"}.get(name, "◷") }}
{%- endmacro %}
{% macro uebersicht(v, mit_organisationen=false) %}
<section class="diagramm-raster">
{{ ring("Distributionen", v.distros) }}
{{ ring("Workspaces", v.workspaces) }}
{% if mit_organisationen %}{{ ring("Geräte je Organisation", v.organisationen) }}{% endif %}
</section>
{% endmacro %}