diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9204635..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.env -__pycache__/ -*.pyc \ No newline at end of file diff --git a/README.md b/README.md index 1a67a64..f921927 100644 --- a/README.md +++ b/README.md @@ -157,15 +157,16 @@ location /app/wdm-performance/ { ### Anzeige-Dashboard (`/m_show`) Reine Anzeigeseite ohne Bedienelemente, gedacht für einen Monitor an der -Maschine (skaliert mit der Bildschirmgröße, dunkles Design, `M` unten -rechts). Sie zeigt: +Maschine (alle Größen skalieren mit der Bildschirmbreite, daher auch für große +TVs bis 4K geeignet; dunkles Design, `M` unten rechts). Sie zeigt: - **Aktueller Auftrag** (Auftragsnummer, darunter Artikel) und **Nächster Auftrag** (erster offene/pausierte Auftrag in der Reihenfolge der Auftragsauswahl), Uhr mit Datum und das Firmenlogo - **Stückzahl (gesamt)** = Soll-Menge, **(produziert)** = zuletzt gebuchte Menge, **(offen)** = gesamt − produziert (bei Überbuchung 0), **Soll pro Stunde**, **Stück/h (Buchung)** = Stück/h der letzten Buchung und - **Abweichung** = Stück/h (Buchung) − Soll pro Stunde + **Abweichung** = Stück/h (Buchung) − Soll pro Stunde (grün ab 0, rot bei + negativer Abweichung) - **Protokoll** aller Buchungen des aktuellen Auftrags, die neueste Buchung steht immer oben (maximal die letzten 50) diff --git a/VERSION b/VERSION index 4a4127c..3eefcb9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.25 +1.0.0 diff --git a/build/app.py b/build/app.py index 705e625..ed9be3e 100644 --- a/build/app.py +++ b/build/app.py @@ -700,6 +700,8 @@ def machine_show(maschine_id): "ist_h": fmt_num(ist_h), # Abweichung der zuletzt gebuchten Rate vom Soll pro Stunde. "abweichung": fmt_num(round(ist_h - soll_h, 2)), + # Grün ab 0 (Soll erreicht oder übertroffen), Rot bei Unterschreitung. + "abweichung_positiv": round(ist_h - soll_h, 2) >= 0, } cur.execute( 'SELECT id, timestamp, status, produziert, h_avg, p_grund FROM "MDE" ' diff --git a/build/static/style.css b/build/static/style.css index 9c4cf43..68c5641 100644 --- a/build/static/style.css +++ b/build/static/style.css @@ -522,124 +522,142 @@ table.data-table td.col-actions { white-space: nowrap; } } /* ------------------------------------------------------------------ - Anzeige-Dashboard (/m_show) - reine Anzeige, skaliert mit der - Bildschirmbreite (Monitor in der Halle) + Anzeige-Dashboard (/m_show) - reine Anzeige für einen großen TV. + Alle Größen sind in em und hängen an EINER Basisschrift, die mit der + Bildschirmbreite mitwächst (Full HD ~16px, 4K ~32px). So bleibt das + Layout auf jeder Auflösung gleich luftig. ------------------------------------------------------------------ */ .dash-body { overflow: hidden; } .dash { + font-size: max(9px, 0.85vw); height: 100vh; - padding: clamp(10px, 1.2vw, 24px); + padding: 1.8em 2em; display: grid; grid-template-rows: auto auto minmax(0, 1fr); - gap: clamp(10px, 1.4vw, 28px); + gap: 1.8em; } .dash-top { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; - gap: clamp(10px, 1.2vw, 24px); - align-items: center; + gap: 1.6em; } .dash-kpis { display: grid; grid-template-columns: repeat(6, 1fr); - gap: clamp(8px, 1vw, 20px); + gap: 1.6em; } -.dash-tile { min-width: 0; padding: 4px 6px; } +.dash-tile { + min-width: 0; + background: var(--panel); + border-radius: 0.7em; + padding: 1.1em 1.3em 1.2em; +} .dash-title { color: var(--text-dim); - font-size: clamp(0.8rem, 1.05vw, 1.3rem); + font-size: 1.1em; font-weight: 600; + letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dash-order { - min-height: 1.2em; - margin-top: 0.4vw; + min-height: 1.15em; + margin-top: 0.5em; text-align: center; - font-size: clamp(1.6rem, 3.2vw, 4.2rem); + font-size: 3.2em; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; } .dash-article { min-height: 1.3em; + margin-top: 0.3em; text-align: center; color: var(--text-dim); - font-size: clamp(0.9rem, 1.3vw, 1.7rem); + font-size: 1.5em; } -.dash-clock { text-align: center; } -.dash-clock-date { font-size: clamp(1rem, 1.5vw, 2rem); } +.dash-clock { + text-align: center; + display: flex; + flex-direction: column; + justify-content: center; +} +.dash-clock-date { font-size: 1.7em; } .dash-clock-time { - font-size: clamp(2.4rem, 5.2vw, 7rem); + margin-top: 0.1em; + font-size: 5em; font-weight: 500; line-height: 1.05; font-variant-numeric: tabular-nums; } +.dash-logo { + display: flex; + align-items: center; + justify-content: center; +} .dash-logo img { display: block; width: auto; - height: clamp(60px, 9vw, 150px); + height: 7.5em; max-width: 100%; - margin: 0 auto; } .dash-value { min-height: 1.1em; - margin-top: 0.6vw; + margin-top: 0.45em; text-align: center; - font-size: clamp(2.2rem, 4.6vw, 6.4rem); + font-size: 4.6em; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; } -.dash-value.green { color: #73bf69; } -.dash-value.red { color: #f2495c; } +.dash-value.green, .dash-value .green { color: #73bf69; } +.dash-value.red, .dash-value .red { color: #f2495c; } .dash-key { background: #5794f2; - border-radius: 6px; color: #fff; } -.dash-key .dash-title { color: rgba(255, 255, 255, 0.85); } +.dash-key .dash-title { color: rgba(255, 255, 255, 0.88); } +/* Ohne aktiven Auftrag (leerer Wert) keine blaue Fläche */ +.dash-key:has(.dash-value:empty) { background: var(--panel); } +.dash-key:has(.dash-value:empty) .dash-title { color: var(--text-dim); } .dash-log { min-height: 0; display: flex; flex-direction: column; - border: 1px solid var(--border); - border-radius: 8px; - padding: clamp(8px, 0.9vw, 16px); + background: var(--panel); + border-radius: 0.7em; + padding: 1.2em 1.4em; } -.dash-log-scroll { flex: 1; min-height: 0; overflow: auto; margin-top: 8px; } +.dash-log-scroll { flex: 1; min-height: 0; overflow: auto; margin-top: 0.7em; } .dash-table { width: 100%; border-collapse: collapse; - font-size: clamp(0.95rem, 1.35vw, 1.8rem); + font-size: 1.45em; font-variant-numeric: tabular-nums; } .dash-table th { position: sticky; top: 0; - background: var(--bg); + background: var(--panel); color: var(--text-dim); text-align: left; font-weight: 600; - padding: 0.5em 0.7em; - border-bottom: 1px solid var(--border); + padding: 0.6em 1em; + border-bottom: 2px solid var(--border); } -.dash-table td { padding: 0.5em 0.7em; border-bottom: 1px solid var(--border); } +.dash-table td { padding: 0.75em 1em; border-bottom: 1px solid var(--border); } .dash-table .num { text-align: right; } -.dash-table tbody tr:first-child td { font-weight: 600; } -/* Ohne aktiven Auftrag (leerer Wert) keine blaue Fläche */ -.dash-key:has(.dash-value:empty) { background: transparent; } -.dash-key:has(.dash-value:empty) .dash-title { color: var(--text-dim); } +.dash-table tbody tr:first-child td { font-weight: 700; } diff --git a/build/templates/machine_show.html b/build/templates/machine_show.html index 40d84a5..29cd282 100644 --- a/build/templates/machine_show.html +++ b/build/templates/machine_show.html @@ -54,7 +54,7 @@
Abweichung
-
{% if k %}{{ k.abweichung }}{% endif %}
+
{% if k %}{{ k.abweichung }}{% endif %}