+1
-1
appview/pages/templates/repo/commit.html
+1
-1
appview/pages/templates/repo/commit.html
+1
-1
appview/pages/templates/repo/index.html
+1
-1
appview/pages/templates/repo/index.html
···
275
275
{{ $pipeline := index $.Pipelines .Hash.String }}
276
276
{{ if and $pipeline (gt (len $pipeline.Statuses) 0) }}
277
277
<div class="inline-block px-1 select-none after:content-['·']"></div>
278
-
{{ template "repo/pipelines/fragments/pipelineSymbolLong" $pipeline }}
278
+
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }}
279
279
{{ end }}
280
280
</div>
281
281
</div>
+2
-2
appview/pages/templates/repo/log.html
+2
-2
appview/pages/templates/repo/log.html
···
84
84
<!-- ci status -->
85
85
{{ $pipeline := index $.Pipelines .Hash.String }}
86
86
{{ if and $pipeline (gt (len $pipeline.Statuses) 0) }}
87
-
{{ template "repo/pipelines/fragments/pipelineSymbolLong" $pipeline }}
87
+
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }}
88
88
{{ end }}
89
89
</td>
90
90
<td class=" py-3 align-top text-gray-500 dark:text-gray-400">{{ timeFmt $commit.Committer.When }}</td>
···
170
170
{{ if and $pipeline (gt (len $pipeline.Statuses) 0) }}
171
171
<div class="inline-block px-1 select-none after:content-['·']"></div>
172
172
<span class="text-sm">
173
-
{{ template "repo/pipelines/fragments/pipelineSymbolLong" $pipeline }}
173
+
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }}
174
174
</span>
175
175
{{ end }}
176
176
</div>
+9
-5
appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html
+9
-5
appview/pages/templates/repo/pipelines/fragments/pipelineSymbolLong.html
···
1
1
{{ define "repo/pipelines/fragments/pipelineSymbolLong" }}
2
-
<div class="group relative inline-block">
3
-
{{ template "repo/pipelines/fragments/pipelineSymbol" $ }}
4
-
{{ template "repo/pipelines/fragments/tooltip" $ }}
2
+
{{ $pipeline := .Pipeline }}
3
+
{{ $repoinfo := .RepoInfo }}
4
+
<div class="relative inline-block">
5
+
<details class="relative">
6
+
<summary class="cursor-pointer list-none">
7
+
{{ template "repo/pipelines/fragments/pipelineSymbol" .Pipeline }}
8
+
</summary>
9
+
{{ template "repo/pipelines/fragments/tooltip" $ }}
10
+
</details>
5
11
</div>
6
12
{{ end }}
7
-
8
-
+25
-21
appview/pages/templates/repo/pipelines/fragments/tooltip.html
+25
-21
appview/pages/templates/repo/pipelines/fragments/tooltip.html
···
1
1
{{ define "repo/pipelines/fragments/tooltip" }}
2
-
<div class="absolute z-[9999] hidden group-hover:block bg-white dark:bg-gray-900 text-black dark:text-white rounded-md shadow w-80 top-full mt-2">
2
+
{{ $repoinfo := .RepoInfo }}
3
+
{{ $pipeline := .Pipeline }}
4
+
{{ $id := $pipeline.Id }}
5
+
<div class="absolute z-[9999] bg-white dark:bg-gray-900 text-black dark:text-white rounded shadow-sm w-80 top-full mt-2 p-2">
3
6
<div class="flex flex-col divide-y divide-gray-200 dark:divide-gray-700">
4
-
{{ range $name, $all := .Statuses }}
5
-
<div class="flex items-center justify-between p-2">
6
-
{{ $lastStatus := $all.Latest }}
7
-
{{ $kind := $lastStatus.Status.String }}
7
+
{{ range $name, $all := $pipeline.Statuses }}
8
+
<a href="/{{ $repoinfo.FullName }}/pipelines/{{ $id }}/workflow/{{ $name }}" class="hover:no-underline">
9
+
<div class="flex items-center justify-between p-2">
10
+
{{ $lastStatus := $all.Latest }}
11
+
{{ $kind := $lastStatus.Status.String }}
8
12
9
-
{{ $t := .TimeTaken }}
10
-
{{ $time := "" }}
11
-
{{ if $t }}
12
-
{{ $time = durationFmt $t }}
13
-
{{ else }}
14
-
{{ $time = printf "%s ago" (shortTimeFmt $.Created) }}
15
-
{{ end }}
13
+
{{ $t := .TimeTaken }}
14
+
{{ $time := "" }}
15
+
{{ if $t }}
16
+
{{ $time = durationFmt $t }}
17
+
{{ else }}
18
+
{{ $time = printf "%s ago" (shortTimeFmt $.Created) }}
19
+
{{ end }}
16
20
17
-
<div id="left" class="flex items-center gap-2 flex-shrink-0">
18
-
{{ template "repo/pipelines/fragments/workflowSymbol" $all }}
19
-
{{ $name }}
21
+
<div id="left" class="flex items-center gap-2 flex-shrink-0">
22
+
{{ template "repo/pipelines/fragments/workflowSymbol" $all }}
23
+
{{ $name }}
24
+
</div>
25
+
<div id="right" class="flex items-center gap-2 flex-shrink-0">
26
+
<span class="font-bold">{{ $kind }}</span>
27
+
<time>{{ $time }}</time>
28
+
</div>
20
29
</div>
21
-
<div id="right" class="flex items-center gap-2 flex-shrink-0">
22
-
<span class="font-bold">{{ $kind }}</span>
23
-
<time>{{ $time }}</time>
24
-
</div>
25
-
</div>
30
+
</a>
26
31
{{ else }}
27
32
<div class="flex items-center gap-2 p-2 italic text-gray-600 dark:text-gray-400 ">
28
33
{{ i "hourglass" "size-4" }}
···
32
37
</div>
33
38
</div>
34
39
{{ end }}
35
-
+1
-1
appview/pages/templates/repo/pipelines/pipelines.html
+1
-1
appview/pages/templates/repo/pipelines/pipelines.html
···
73
73
</div>
74
74
75
75
<div class="text-sm md:text-base col-span-1">
76
-
{{ template "repo/pipelines/fragments/pipelineSymbolLong" . }}
76
+
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" . "RepoInfo" $root.RepoInfo) }}
77
77
</div>
78
78
79
79
<div class="text-sm md:text-base col-span-1 text-right">