From 93f5739984145bebf5d29b3d68d037081e4e5a3c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 13 Feb 2025 16:26:14 +0000 Subject: [PATCH] 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 --- src/templates/jobs/macros.html | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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() %}
-- 2.47.3