From: Michael Tremer Date: Thu, 13 Feb 2025 16:26:14 +0000 (+0000) Subject: jobs: Move runtime into subtitle X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93f5739984145bebf5d29b3d68d037081e4e5a3c;p=pbs.git jobs: Move runtime into subtitle This is a lot easier and looks cleaner because the runtime has a very variable width. Signed-off-by: Michael Tremer --- diff --git a/src/templates/jobs/macros.html b/src/templates/jobs/macros.html index aa10c01c..140c1fd1 100644 --- a/src/templates/jobs/macros.html +++ b/src/templates/jobs/macros.html @@ -112,7 +112,12 @@ {% elif job.has_failed() %}

- {{ _("Failed %s") % job.finished_at | format_date(shorter=True) }} + {% set args = { + "duration" : job.duration | format_time, + "when" : job.finished_at | format_date(shorter=True), + } %} + + {{ _("Failed %(when)s after %(duration)s") % args }}

@@ -120,7 +125,12 @@ {% elif job.has_finished() %}

- {{ _("Finished %s") % job.finished_at | format_date(shorter=True) }} + {% set args = { + "duration" : job.duration | format_time, + "when" : job.finished_at | format_date(shorter=True), + } %} + + {{ _("Finished %(when)s in %(duration)s") % args }}

@@ -175,15 +185,6 @@ {% endif %} {% endif %} - {# Runtime #} - {% if job.has_finished() %} -
-
- {{ job.duration | format_time }} -
-
- {% endif %} - {# Logs #} {% if job.show_log() %}