From 71c2b9dc63d4c92adaa385dbe82fa78bde965a59 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 28 Jul 2024 12:08:54 +0200 Subject: [PATCH] feat: add task state status badge --- assets/styles/app.css | 12 ++++++++++++ src/templates/pages/list_task_runs.html | 10 +++++++++- src/templates/pages/task_run_details.html | 8 ++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/assets/styles/app.css b/assets/styles/app.css index bc8a4a7..caa530d 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -12,3 +12,15 @@ table tbody tr td:first-child { .logs-lines { white-space: nowrap; } + +.task-status_running { + background-color: blue; +} + +.task-status_success { + background-color: green; +} + +.task-status_failed { + background-color: red; +} diff --git a/src/templates/pages/list_task_runs.html b/src/templates/pages/list_task_runs.html index 6b71775..f839283 100644 --- a/src/templates/pages/list_task_runs.html +++ b/src/templates/pages/list_task_runs.html @@ -1,6 +1,11 @@ {% extends "layouts/base.html" %} {% block body %}

List of task runs for "{{ task.name }}"

+ {% if runs | length == 0 %} +

+ No tasks runs to show +

+ {% else %} @@ -20,7 +25,9 @@ {{ task_run.started_at }}
- {{ task_run.status }} + + {{ task_run.status }} + Details @@ -29,4 +36,5 @@ {% endfor %}
+ {% endif %} {% endblock %} diff --git a/src/templates/pages/task_run_details.html b/src/templates/pages/task_run_details.html index f0d1eef..b914e1d 100644 --- a/src/templates/pages/task_run_details.html +++ b/src/templates/pages/task_run_details.html @@ -3,7 +3,11 @@

Task run details