From e5c4b3d5e69bb3179a07c4e5e7f1647dc73c6219 Mon Sep 17 00:00:00 2001 From: n07070 Date: Wed, 18 Nov 2026 13:46:15 +0100 Subject: [PATCH] Add new queue page and status indicator on the homepage --- src/templates/base.html | 12 +++++++++- src/templates/queue.html | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 src/templates/queue.html diff --git a/src/templates/base.html b/src/templates/base.html index d441fab..337174a 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -22,6 +22,16 @@ Webcam + + + @@ -45,7 +55,6 @@ {% endif %} {% endwith %} - {% block content %} @@ -57,5 +66,6 @@ + diff --git a/src/templates/queue.html b/src/templates/queue.html new file mode 100644 index 0000000..619c2a9 --- /dev/null +++ b/src/templates/queue.html @@ -0,0 +1,47 @@ +{% extends 'base.html' %} + +{% block content %} + +

Worker state : {{ worker_state.state }}

+ +

Current tasks

+
+{% if not tasks %} + +{% endif %} +
+ {% for task in tasks %} +
+
+ {% if task.type == "TaskType.IMAGE" %} + {% set img_path = task.content.img.split('/')[-1] %} + Image could not be loaded + {% endif %} + {% if task.type == "TaskType.CUT" %} + Image could not be loaded + {% endif %} +
+ {% if task.type == "TaskType.TEXT" %} +

ID : {{ task.content.txt }}

+ {% endif %} + +

ID : {{ task.task_id }}

+
+
+
+ {% endfor %} +
+
+

Completed tasks

+
+ +{% if not completed_tasks %} + +{% endif %} + +{% for task in completed_tasks %} + +{% endfor %} + + +{% endblock %} \ No newline at end of file