From de50271cb4b74f2b4188473672438e61c14096f1 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Mon, 23 Jun 2025 15:52:00 +0300 Subject: [PATCH] appview/pages: show timeout status Signed-off-by: Anirudh Oppiliappan --- .../pipelines/fragments/pipelineSymbol.html | 22 +++++++++++++------ .../pipelines/fragments/workflowSymbol.html | 3 +++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html index 1b2e621d..4ad6bbfb 100644 --- a/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html +++ b/appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html @@ -5,9 +5,11 @@ {{ $total := len $statuses }} {{ $success := index $c "success" }} {{ $fail := index $c "failed" }} + {{ $timeout := index $c "timeout" }} {{ $empty := eq $total 0 }} {{ $allPass := eq $success $total }} {{ $allFail := eq $fail $total }} + {{ $allTimeout := eq $timeout $total }} {{ if $empty }}
@@ -16,12 +18,17 @@
{{ else if $allPass }}
- {{ i "check" "size-4 text-green-600" }} + {{ i "check" "size-4 text-green-600" }} {{ $total }}/{{ $total }}
{{ else if $allFail }}
- {{ i "x" "size-4 text-red-600" }} + {{ i "x" "size-4 text-red-600" }} + 0/{{ $total }} +
+ {{ else if $allTimeout }} +
+ {{ i "clock-alert" "size-4 text-orange-400" }} 0/{{ $total }}
{{ else }} @@ -35,13 +42,15 @@ {{ range $kind, $count := $c }} {{ $color := "" }} {{ if or (eq $kind "pending") (eq $kind "running") }} - {{ $color = "#eab308" }} + {{ $color = "#eab308" }} {{/* amber-500 */}} {{ else if eq $kind "success" }} - {{ $color = "#10b981" }} + {{ $color = "#10b981" }} {{/* green-500 */}} {{ else if eq $kind "cancelled" }} - {{ $color = "#6b7280" }} + {{ $color = "#6b7280" }} {{/* gray-500 */}} + {{ else if eq $kind "timeout" }} + {{ $color = "#fb923c" }} {{/* orange-400 */}} {{ else }} - {{ $color = "#ef4444" }} + {{ $color = "#ef4444" }} {{/* red-500 for failed or unknown */}} {{ end }} {{ $percent := divf64 (f64 $count) (f64 $total) }} @@ -63,4 +72,3 @@ {{ end }} {{ end }} - diff --git a/appview/pages/templates/repo/pipelines/fragments/workflowSymbol.html b/appview/pages/templates/repo/pipelines/fragments/workflowSymbol.html index 2b2b4d1e..8f4a6885 100644 --- a/appview/pages/templates/repo/pipelines/fragments/workflowSymbol.html +++ b/appview/pages/templates/repo/pipelines/fragments/workflowSymbol.html @@ -17,6 +17,9 @@ {{ else if eq $kind "cancelled" }} {{ $icon = "circle-slash" }} {{ $color = "text-gray-600 dark:text-gray-500" }} + {{ else if eq $kind "timeout" }} + {{ $icon = "clock-alert" }} + {{ $color = "text-orange-400 dark:text-orange-300" }} {{ else }} {{ $icon = "x" }} {{ $color = "text-red-600 dark:text-red-500" }} -- 2.51.2