From 8810679c6f864a6b49d99571f9b7957cd5ab7719 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 13 Feb 2025 16:20:01 +0000 Subject: [PATCH] jobs: Show type icon for all job types Signed-off-by: Michael Tremer --- src/templates/builds/show.html | 2 +- src/templates/jobs/macros.html | 56 +++++++++++++++++++++++----------- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/src/templates/builds/show.html b/src/templates/builds/show.html index fbc28cf2..ada2790c 100644 --- a/src/templates/builds/show.html +++ b/src/templates/builds/show.html @@ -152,7 +152,7 @@
{{ _("Jobs")}}
- {{ JobList(build.jobs, show_arch_only=True, show_owner=False) }} + {{ JobList(build.jobs, show_arch_only=True, show_type=False) }} {# Bug? #} {% if build.has_failed() %} diff --git a/src/templates/jobs/macros.html b/src/templates/jobs/macros.html index 2d11c463..ac94aabe 100644 --- a/src/templates/jobs/macros.html +++ b/src/templates/jobs/macros.html @@ -20,7 +20,7 @@ {% from "users/macros.html" import Avatar with context %} -{% macro JobList(jobs, show_arch_only=False, show_owner=True) %} +{% macro JobList(jobs, show_arch_only=False, show_type=True) %}
{% for job in jobs %}
@@ -172,6 +172,16 @@
{% endif %} + + {# Runtime #} + {% if job.has_finished() %} +
+
+ {{ job.duration | format_time }} +
+
+ {% endif %} + {# Logs #} {% if job.show_log() %}
@@ -211,24 +221,34 @@
{% endif %} - {# Scratch Build? #} - {% if show_owner and job.build.is_scratch() %} - - -
- {{ Avatar(job.build.owner, size=48) }} -
-
-
- {% endif %} + {# Show type? #} + {% if show_type %} + {# Scratch Build? #} + {% if job.build.is_scratch() %} + + +
+ {{ Avatar(job.build.owner, size=48) }} +
+
+
- {# Runtime #} - {% if job.has_finished() %} -
-
- {{ job.duration | format_time }} -
-
+ {# Test Build? #} + {% elif job.build.is_test() %} + + + + + + + {# Release Build? #} + {% else %} + + + + + + {% endif %} {% endif %}
-- 2.47.3