From: Michael Tremer Date: Thu, 23 Jan 2025 09:55:51 +0000 (+0000) Subject: jobs: Fix rendering the queue X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9f82e5bf8cc7f247bba52b1b7fb54f7afdcb09a;p=pbs.git jobs: Fix rendering the queue Signed-off-by: Michael Tremer --- diff --git a/src/templates/jobs/queue.html b/src/templates/jobs/queue.html index 0ca8134b..4d265bed 100644 --- a/src/templates/jobs/queue.html +++ b/src/templates/jobs/queue.html @@ -1,6 +1,8 @@ -{% extends "../base.html" %} +{% extends "base.html" %} -{% block title %}{{ _("Job Queue") }}{% end block %} +{% from "jobs/macros.html" import JobQueue with context %} + +{% block title %}{{ _("Job Queue") }}{% endblock %} {% block body %}
@@ -11,6 +13,7 @@
  • {{ _("Jobs") }}
  • +
  • {{ _("Queue") }} @@ -26,13 +29,7 @@
    - {% if queue %} - {% module JobsQueue(queue) %} - {% else %} -
    - {{ _("There are currently no jobs queued") }} -
    - {% end %} + {{ JobQueue(queue) }}
    -{% end block %} +{% endblock %} diff --git a/src/web/jobs.py b/src/web/jobs.py index c851a25d..d4ea530b 100644 --- a/src/web/jobs.py +++ b/src/web/jobs.py @@ -158,8 +158,8 @@ class IndexHandler(base.BaseHandler): class QueueHandler(base.BaseHandler): - def get(self): - self.render("jobs/queue.html", queue=self.backend.jobs.queue) + async def get(self): + await self.render("jobs/queue.html", queue=self.backend.jobs.queue) class LogHandler(base.BaseHandler):