1{{ define "title" }} {{ .Workflow }} · pipeline {{ .Pipeline.Id }} · {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "extrameta" }}
4 {{ $title := "pipelines"}}
5 {{ $url := printf "https://tangled.sh/%s/pipelines" .RepoInfo.FullName }}
6 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
7{{ end }}
8
9{{ define "repoContent" }}
10<section class="w-full grid grid-cols-1 md:grid-cols-4 gap-2 mt-2">
11 <div class="col-span-1">
12 {{ block "sidebar" . }} {{ end }}
13 </div>
14 <div class="col-span-1 md:col-span-3">
15 {{ block "logs" . }} {{ end }}
16 </div>
17</section>
18{{ end }}
19
20{{ define "sidebar" }}
21 {{ $active := .Workflow }}
22
23 {{ $activeTab := "bg-white dark:bg-gray-700 drop-shadow-sm" }}
24 {{ $inactiveTab := "bg-gray-100 dark:bg-gray-800" }}
25
26 {{ with .Pipeline }}
27 {{ $id := .Id }}
28 <div class="sticky top-2 grid grid-cols-1 rounded border border-gray-200 dark:border-gray-700 divide-y divide-gray-200 dark:divide-gray-700">
29 {{ range $name, $all := .Statuses }}
30 <a href="/{{ $.RepoInfo.FullName }}/pipelines/{{ $id }}/workflow/{{ $name }}" class="no-underline hover:no-underline hover:bg-gray-100/25 hover:dark:bg-gray-700/25">
31 <div
32 class="flex gap-2 items-center justify-between p-2 {{ if eq $name $active }} {{ $activeTab }} {{ else }} {{ $inactiveTab }} {{ end }}">
33 {{ $lastStatus := $all.Latest }}
34 {{ $kind := $lastStatus.Status.String }}
35
36 <div id="left" class="flex items-center gap-2 flex-shrink-0">
37 {{ template "repo/pipelines/fragments/workflowSymbol" $all }}
38 {{ $name }}
39 </div>
40 <div id="right" class="flex items-center gap-2 flex-shrink-0">
41 <span class="font-bold">{{ $kind }}</span>
42 {{ if .TimeTaken }}
43 {{ template "repo/fragments/duration" .TimeTaken }}
44 {{ else }}
45 {{ template "repo/fragments/shortTimeAgo" $lastStatus.Created }}
46 {{ end }}
47 </div>
48 </div>
49 </a>
50 {{ end }}
51 </div>
52 {{ end }}
53{{ end }}
54
55{{ define "logs" }}
56 <div id="log-stream"
57 class="text-sm"
58 hx-ext="ws"
59 ws-connect="/{{ $.RepoInfo.FullName }}/pipelines/{{ .Pipeline.Id }}/workflow/{{ .Workflow }}/logs">
60 <div id="lines" class="flex flex-col gap-2">
61 </div>
62 </div>
63{{ end }}