This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<title>{{ title }} – Hour by Hour</title>
|
||||
<link rel="icon" type="image/svg+xml" href="{{ url_for('static', filename='logo.svg') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
{% block head_extra %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
@@ -21,5 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if maschine_badge_id %}<div class="machine-id-badge">M{{ maschine_badge_id }}</div>{% endif %}
|
||||
{% if tablet_code %}<div class="tablet-id-badge" title="Kennung dieses Tablets">{{ tablet_code }}</div>{% endif %}
|
||||
{% if tablet_ziel %}<script src="{{ url_for('static', filename='tablet.js') }}" data-ziel="{{ tablet_ziel }}" data-abfrage="{{ url_for('tablet_ziel') }}" defer></script>{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<a class="big-btn neutral" href="{{ url_for('leitstand_prioritaet') }}">↕ Auftragspriorität</a>
|
||||
<a class="big-btn" href="{{ url_for('leitstand_maschinen') }}">🛠 Zu Maschine springen</a>
|
||||
<a class="big-btn" href="{{ url_for('leitstand_maschinen', ziel='show') }}">Zur Anzeige springen</a>
|
||||
<a class="big-btn" href="{{ url_for('tablets_verwaltung') }}">Tablets zuordnen</a>
|
||||
<a class="big-btn" href="{{ url_for('maschinenverwaltung') }}">🔒 Maschinenverwaltung</a>
|
||||
</div>
|
||||
<p class="version-info">Hour by Hour – Version {{ app_version }}</p>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<li>Aufträge für unbekannte Maschinen werden verworfen.</li>
|
||||
<li>Bereits vorhandene FA.-Nrn. werden nicht überschrieben; eine gültige Priorität aus der Datei wird aber übernommen.</li>
|
||||
<li>Weicht die Maschine eines vorhandenen Auftrags ab, wirst du vor dem Import gefragt.</li>
|
||||
<li>Aktive Aufträge werden nicht importiert.</li>
|
||||
<li>Aktive Aufträge werden nicht importiert – nur ihre Priorität wird übernommen (bei passender Maschine).</li>
|
||||
<li>Rest-Menge 0: Auftrag wird direkt als abgeschlossen angelegt.</li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
@@ -129,5 +129,6 @@
|
||||
setInterval(aktualisieren, 15000);
|
||||
})();
|
||||
</script>
|
||||
{% if tablet_ziel %}<script src="{{ url_for('static', filename='tablet.js') }}" data-ziel="{{ tablet_ziel }}" data-abfrage="{{ url_for('tablet_ziel') }}" defer></script>{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
{% block head_extra %}<meta http-equiv="refresh" content="10;url={{ url_for('tablet_start') }}">{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card tablet-wait">
|
||||
<div class="tablet-wait-title">Dieses Tablet ist noch keiner Seite zugeordnet</div>
|
||||
{% if ziel_war_ungueltig %}
|
||||
<p class="hint">Die zugeordnete Maschine existiert nicht mehr. Bitte im Admin-Bereich neu zuordnen.</p>
|
||||
{% else %}
|
||||
<p class="hint">Bitte im Admin-Bereich unter „Tablets zuordnen“ eine Seite für dieses Gerät auswählen.</p>
|
||||
{% endif %}
|
||||
<div class="tablet-code">{{ kurzkennung }}</div>
|
||||
<p class="hint">Kennung dieses Tablets – die Seite aktualisiert sich automatisch, sobald eine Zuordnung vorliegt.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,100 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="back-row top">
|
||||
<a class="big-btn small neutral" href="{{ url_for('leitstand_home') }}">← Zurück</a>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<p class="hint">
|
||||
Auf allen Tablets diese Adresse öffnen: <strong>{{ tablet_url }}</strong><br>
|
||||
Neue Tablets erscheinen hier automatisch als „nicht zugeordnet“ (die Kennung steht auch auf dem Tablet).
|
||||
Ein Link für alle Geräte genügt – jedes Tablet merkt sich seine Kennung selbst.
|
||||
Nach dem Speichern wechselt das Tablet innerhalb von ca. 20 Sekunden auf die gewählte Seite.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="card {{ 'learn-on' if lernmodus else '' }}">
|
||||
<form method="post" action="{{ url_for('tablets_lernmodus') }}" class="learn-form">
|
||||
<div>
|
||||
<strong>Lernmodus: {{ 'AN' if lernmodus else 'AUS' }}</strong><br>
|
||||
<span class="hint">
|
||||
Solange er an ist, werden Geräte, die noch über einen einzelnen Link (<code>/m<N></code> oder
|
||||
<code>/m<N>_show</code>) kommen, automatisch gespeichert und genau dieser Seite zugeordnet.
|
||||
Beim nächsten Besuch über <code>/tablet</code> werden sie erkannt. Nach der Umstellung bitte ausschalten,
|
||||
sonst wird auch z. B. ein PC registriert, der eine Maschinenseite öffnet.
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" name="an" value="{{ '0' if lernmodus else '1' }}">
|
||||
<button type="submit" class="big-btn small {{ 'neutral' if lernmodus else 'primary' }}">{{ 'Lernmodus ausschalten' if lernmodus else 'Lernmodus einschalten' }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if not tablets %}
|
||||
<div class="empty-state">Noch kein Tablet registriert.</div>
|
||||
{% else %}
|
||||
<div class="list-meta">{{ tablets|length }} Tablets</div>
|
||||
<div class="table-wrap">
|
||||
<table class="data-table tablet-table">
|
||||
<thead>
|
||||
<tr><th>Status</th><th>Zuletzt gemeldet</th><th>Kennung</th><th colspan="3">Name / Ziel / Maschine</th><th class="col-actions"></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for t in tablets %}
|
||||
<tr>
|
||||
<td><span class="tablet-dot {{ 'on' if t.online else 'off' }}"></span>{{ 'online' if t.online else 'offline' }}</td>
|
||||
<td>
|
||||
{{ t.gesehen_relativ }}
|
||||
<small class="tablet-seen">{% if t.gesehen_ts %}<time data-ts="{{ t.gesehen_ts }}"></time>{% else %} {% endif %}</small>
|
||||
</td>
|
||||
<td>{{ t.kurz }}</td>
|
||||
<td colspan="3">
|
||||
<form method="post" action="{{ url_for('tablets_speichern', tablet_id=t.id) }}" class="tablet-form" id="tf{{ t.id }}">
|
||||
<input type="text" name="name" value="{{ t.name or '' }}" maxlength="60" aria-label="Name">
|
||||
<select name="ziel_typ" aria-label="Ziel">
|
||||
<option value="" {% if not t.ziel_typ %}selected{% endif %}>– nicht zugeordnet –</option>
|
||||
{% for wert, label in ziele.items() %}
|
||||
<option value="{{ wert }}" {% if t.ziel_typ == wert %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select name="maschine_id" aria-label="Maschine">
|
||||
<option value="">–</option>
|
||||
{% for m in maschinen %}
|
||||
<option value="{{ m.id }}" {% if t.maschine_id == m.id %}selected{% endif %}>{{ m.name or ('Maschine ' ~ m.id) }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if not t.ziel_typ and tablets|length > 1 %}
|
||||
<select name="ersetzt_id" aria-label="Zuordnung übernehmen von" title="Ersetzt dieses Tablet ein altes (z. B. nach gelöschten Browserdaten)? Dann dessen Zuordnung übernehmen.">
|
||||
<option value="">Ersetzt Tablet … (optional)</option>
|
||||
{% for o in tablets if o.id != t.id and not o.online %}
|
||||
<option value="{{ o.id }}">{{ o.name }} ({{ o.kurz }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
</form>
|
||||
</td>
|
||||
<td class="col-actions">
|
||||
<div class="row-actions">
|
||||
<button type="submit" form="tf{{ t.id }}" class="icon-btn">Speichern</button>
|
||||
<form method="post" action="{{ url_for('tablets_loeschen', tablet_id=t.id) }}" class="order-form">
|
||||
<button type="submit" class="icon-btn danger">Entfernen</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p class="hint">Die Maschine wird nur bei „Maschinenseite“ und „Anzeige (Show)“ verwendet.</p>
|
||||
{% endif %}
|
||||
<script>
|
||||
(function () {
|
||||
function z2(n) { return (n < 10 ? '0' : '') + n; }
|
||||
var els = document.querySelectorAll('time[data-ts]');
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
var d = new Date(parseInt(els[i].getAttribute('data-ts'), 10) * 1000);
|
||||
els[i].textContent = z2(d.getDate()) + '.' + z2(d.getMonth() + 1) + '. ' + z2(d.getHours()) + ':' + z2(d.getMinutes()) + ':' + z2(d.getSeconds());
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user