forked from tangled.org/core
this repo has no description

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