From f034c5e62632a38d900665b16de539057c752e3e Mon Sep 17 00:00:00 2001 From: Dominic Gundel Date: Mon, 19 Oct 2026 11:35:59 +0200 Subject: [PATCH] Wand: Queue-Strip nur bei Ablauf; Start wartet auf printing statt Falsch-Fertig. --- CHANGELOG.md | 8 ++++++++ grotti/print_queue.py | 9 +++++---- web/templates/wand.html | 7 ++++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b68a2..925b11b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ Alle Änderungen an Grotti. Format nach [Keep a Changelog](https://keepachangelo ## [Unreleased] +### Geändert + +- **Wand:** „Aus der Warteschlange“-Strip nur noch bei Ablauf (mit Schritten); einfacher Queue-Druck zeigt nur DRUCKT. + +### Behoben + +- **Queue zu früh „Fertig.“:** Nach Start bleibt Phase `starting`, bis Moonraker `printing` meldet — alter `complete`/`standby` schließt den Job nicht mehr. + ## [3.5.0] – 2026-10-19 ### Neu diff --git a/grotti/print_queue.py b/grotti/print_queue.py index f188dfe..0f44ebe 100644 --- a/grotti/print_queue.py +++ b/grotti/print_queue.py @@ -421,16 +421,16 @@ class PrintQueueDispatcher: from grotti import orders orders.attach_order_item_to_live_run(wconn, host, name, oid) - # Nicht sofort „done“: sonst greift der nächste Wartende, während - # der Drucker noch druckt (Live-Cache kann kurz FREE bleiben). + # Phase „starting“ lassen, bis Moonraker printing meldet. + # Sofort print_active + alter complete/standby → fälschlich „Fertig.“ store.update_print_queue( wconn, item_id, { "status": "running", - "message": "Druckt auf %s: %s" % (printer_copy["name"], name), + "message": "Startet auf %s: %s" % (printer_copy["name"], name), "host": host, - "phase": "print_active", + "phase": "starting", "phase_started_at": "now", }, ) @@ -498,6 +498,7 @@ class PrintQueueDispatcher: "message": "Druckt…", }, ) + # complete/standby vom vorherigen Auftrag: noch warten, nicht „Fertig.“ return if phase != "print_active": return diff --git a/web/templates/wand.html b/web/templates/wand.html index 5381e34..d48a46f 100644 --- a/web/templates/wand.html +++ b/web/templates/wand.html @@ -322,13 +322,14 @@ function actionsHtml(state, printer) { function flowHtml(printer) { const job = printer.queue_running; const bits = []; - if (job) { + // Nur Ablauf braucht den Strip (Schritte). Einfacher Queue-Druck: Karte zeigt schon DRUCKT. + if (job && job.is_ablauf) { const rep = repeatText(job); - const title = job.is_ablauf ? "Ablauf" + (rep ? " " + rep : "") : "Aus der Warteschlange"; + const title = "Ablauf" + (rep ? " " + rep : ""); bits.push(`
${icon("queue")}${escapeHtml(title)}
- ${job.is_ablauf ? stepsHtml(job.step_labels, job.display_step_index != null ? job.display_step_index : job.step_index) : ""} + ${stepsHtml(job.step_labels, job.display_step_index != null ? job.display_step_index : job.step_index)} ${job.message ? `
${escapeHtml(phaseText(job))}
` : ""}
`); }