Monorepo for Tangled tangled.org

appview/pages: show timeout status

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.sh>

anirudh.fi de50271c 6d10fb1c

verified
Changed files
+18 -7
appview
pages
templates
repo
+15 -7
appview/pages/templates/repo/pipelines/fragments/pipelineSymbol.html
··· 5 5 {{ $total := len $statuses }} 6 6 {{ $success := index $c "success" }} 7 7 {{ $fail := index $c "failed" }} 8 + {{ $timeout := index $c "timeout" }} 8 9 {{ $empty := eq $total 0 }} 9 10 {{ $allPass := eq $success $total }} 10 11 {{ $allFail := eq $fail $total }} 12 + {{ $allTimeout := eq $timeout $total }} 11 13 12 14 {{ if $empty }} 13 15 <div class="flex gap-1 items-center"> ··· 16 18 </div> 17 19 {{ else if $allPass }} 18 20 <div class="flex gap-1 items-center"> 19 - {{ i "check" "size-4 text-green-600" }} 21 + {{ i "check" "size-4 text-green-600" }} 20 22 <span>{{ $total }}/{{ $total }}</span> 21 23 </div> 22 24 {{ else if $allFail }} 23 25 <div class="flex gap-1 items-center"> 24 - {{ i "x" "size-4 text-red-600" }} 26 + {{ i "x" "size-4 text-red-600" }} 27 + <span>0/{{ $total }}</span> 28 + </div> 29 + {{ else if $allTimeout }} 30 + <div class="flex gap-1 items-center"> 31 + {{ i "clock-alert" "size-4 text-orange-400" }} 25 32 <span>0/{{ $total }}</span> 26 33 </div> 27 34 {{ else }} ··· 35 42 {{ range $kind, $count := $c }} 36 43 {{ $color := "" }} 37 44 {{ if or (eq $kind "pending") (eq $kind "running") }} 38 - {{ $color = "#eab308" }} 45 + {{ $color = "#eab308" }} {{/* amber-500 */}} 39 46 {{ else if eq $kind "success" }} 40 - {{ $color = "#10b981" }} 47 + {{ $color = "#10b981" }} {{/* green-500 */}} 41 48 {{ else if eq $kind "cancelled" }} 42 - {{ $color = "#6b7280" }} 49 + {{ $color = "#6b7280" }} {{/* gray-500 */}} 50 + {{ else if eq $kind "timeout" }} 51 + {{ $color = "#fb923c" }} {{/* orange-400 */}} 43 52 {{ else }} 44 - {{ $color = "#ef4444" }} 53 + {{ $color = "#ef4444" }} {{/* red-500 for failed or unknown */}} 45 54 {{ end }} 46 55 47 56 {{ $percent := divf64 (f64 $count) (f64 $total) }} ··· 63 72 {{ end }} 64 73 </div> 65 74 {{ end }} 66 -
+3
appview/pages/templates/repo/pipelines/fragments/workflowSymbol.html
··· 17 17 {{ else if eq $kind "cancelled" }} 18 18 {{ $icon = "circle-slash" }} 19 19 {{ $color = "text-gray-600 dark:text-gray-500" }} 20 + {{ else if eq $kind "timeout" }} 21 + {{ $icon = "clock-alert" }} 22 + {{ $color = "text-orange-400 dark:text-orange-300" }} 20 23 {{ else }} 21 24 {{ $icon = "x" }} 22 25 {{ $color = "text-red-600 dark:text-red-500" }}