1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.3.1020
4package web
5
6//lint:file-ignore SA4006 This context is only used if a nested component is present.
7
8import "github.com/a-h/templ"
9import templruntime "github.com/a-h/templ/runtime"
10
11// The CI pages: the runs of a repository, a run with its jobs, a job with its
12// steps and its log (actions.go). A state is always a word as well as a
13// symbol and a colour.
14
15// CheckIcon is the symbol of a state: a mark in the colour of its kind, with
16// the state as its text for a screen reader.
17func CheckIcon(kind, state string) templ.Component {
18 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
19 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
20 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
21 return templ_7745c5c3_CtxErr
22 }
23 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
24 if !templ_7745c5c3_IsBuffer {
25 defer func() {
26 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
27 if templ_7745c5c3_Err == nil {
28 templ_7745c5c3_Err = templ_7745c5c3_BufErr
29 }
30 }()
31 }
32 ctx = templ.InitializeContext(ctx)
33 templ_7745c5c3_Var1 := templ.GetChildren(ctx)
34 if templ_7745c5c3_Var1 == nil {
35 templ_7745c5c3_Var1 = templ.NopComponent
36 }
37 ctx = templ.ClearChildren(ctx)
38 var templ_7745c5c3_Var2 = []any{"ck", "ck-" + kind}
39 templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var2...)
40 if templ_7745c5c3_Err != nil {
41 return templ_7745c5c3_Err
42 }
43 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<span class=\"")
44 if templ_7745c5c3_Err != nil {
45 return templ_7745c5c3_Err
46 }
47 var templ_7745c5c3_Var3 string
48 templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var2).String())
49 if templ_7745c5c3_Err != nil {
50 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 1, Col: 0}
51 }
52 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var3)
53 if templ_7745c5c3_Err != nil {
54 return templ_7745c5c3_Err
55 }
56 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" role=\"img\" aria-label=\"")
57 if templ_7745c5c3_Err != nil {
58 return templ_7745c5c3_Err
59 }
60 var templ_7745c5c3_Var4 string
61 templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.ResolveAttributeValue(state)
62 if templ_7745c5c3_Err != nil {
63 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 10, Col: 65}
64 }
65 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var4)
66 if templ_7745c5c3_Err != nil {
67 return templ_7745c5c3_Err
68 }
69 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\" title=\"")
70 if templ_7745c5c3_Err != nil {
71 return templ_7745c5c3_Err
72 }
73 var templ_7745c5c3_Var5 string
74 templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.ResolveAttributeValue(state)
75 if templ_7745c5c3_Err != nil {
76 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 10, Col: 81}
77 }
78 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var5)
79 if templ_7745c5c3_Err != nil {
80 return templ_7745c5c3_Err
81 }
82 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\"></span>")
83 if templ_7745c5c3_Err != nil {
84 return templ_7745c5c3_Err
85 }
86 return nil
87 })
88}
89
90func Actions(l Layout, p ActionsPage) templ.Component {
91 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
92 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
93 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
94 return templ_7745c5c3_CtxErr
95 }
96 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
97 if !templ_7745c5c3_IsBuffer {
98 defer func() {
99 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
100 if templ_7745c5c3_Err == nil {
101 templ_7745c5c3_Err = templ_7745c5c3_BufErr
102 }
103 }()
104 }
105 ctx = templ.InitializeContext(ctx)
106 templ_7745c5c3_Var6 := templ.GetChildren(ctx)
107 if templ_7745c5c3_Var6 == nil {
108 templ_7745c5c3_Var6 = templ.NopComponent
109 }
110 ctx = templ.ClearChildren(ctx)
111 templ_7745c5c3_Var7 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
112 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
113 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
114 if !templ_7745c5c3_IsBuffer {
115 defer func() {
116 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
117 if templ_7745c5c3_Err == nil {
118 templ_7745c5c3_Err = templ_7745c5c3_BufErr
119 }
120 }()
121 }
122 ctx = templ.InitializeContext(ctx)
123 if len(p.Runs) == 0 {
124 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<p class=\"dim\">no runs yet: a push that matches a workflow of .github/workflows starts one.</p>")
125 if templ_7745c5c3_Err != nil {
126 return templ_7745c5c3_Err
127 }
128 } else {
129 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<table class=\"list runs\" aria-label=\"Runs\"><thead><tr><th class=\"c-st\"></th><th class=\"c-name\">workflow</th><th class=\"c-sub\">commit</th><th class=\"c-ref\">ref</th><th class=\"c-who\">actor</th><th class=\"c-dur\">time</th><th class=\"c-when\">created</th></tr></thead> <tbody id=\"run-rows\" data-rows>")
130 if templ_7745c5c3_Err != nil {
131 return templ_7745c5c3_Err
132 }
133 for _, r := range p.Runs {
134 templ_7745c5c3_Err = RunListRow(r).Render(ctx, templ_7745c5c3_Buffer)
135 if templ_7745c5c3_Err != nil {
136 return templ_7745c5c3_Err
137 }
138 }
139 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</tbody></table>")
140 if templ_7745c5c3_Err != nil {
141 return templ_7745c5c3_Err
142 }
143 }
144 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, " ")
145 if templ_7745c5c3_Err != nil {
146 return templ_7745c5c3_Err
147 }
148 if p.More != "" {
149 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<p class=\"more\"><a href=\"")
150 if templ_7745c5c3_Err != nil {
151 return templ_7745c5c3_Err
152 }
153 var templ_7745c5c3_Var8 templ.SafeURL
154 templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.More))
155 if templ_7745c5c3_Err != nil {
156 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 30, Col: 50}
157 }
158 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
159 if templ_7745c5c3_Err != nil {
160 return templ_7745c5c3_Err
161 }
162 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "\" rel=\"next\">older runs</a></p>")
163 if templ_7745c5c3_Err != nil {
164 return templ_7745c5c3_Err
165 }
166 }
167 return nil
168 })
169 templ_7745c5c3_Err = Shell(l, nil).Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
170 if templ_7745c5c3_Err != nil {
171 return templ_7745c5c3_Err
172 }
173 return nil
174 })
175}
176
177// RunListRow is a row of the list of runs; its id is the target of the live
178// updates.
179func RunListRow(r RunRow) templ.Component {
180 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
181 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
182 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
183 return templ_7745c5c3_CtxErr
184 }
185 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
186 if !templ_7745c5c3_IsBuffer {
187 defer func() {
188 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
189 if templ_7745c5c3_Err == nil {
190 templ_7745c5c3_Err = templ_7745c5c3_BufErr
191 }
192 }()
193 }
194 ctx = templ.InitializeContext(ctx)
195 templ_7745c5c3_Var9 := templ.GetChildren(ctx)
196 if templ_7745c5c3_Var9 == nil {
197 templ_7745c5c3_Var9 = templ.NopComponent
198 }
199 ctx = templ.ClearChildren(ctx)
200 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<tr id=\"")
201 if templ_7745c5c3_Err != nil {
202 return templ_7745c5c3_Err
203 }
204 var templ_7745c5c3_Var10 string
205 templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue("run-" + r.ID)
206 if templ_7745c5c3_Err != nil {
207 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 38, Col: 23}
208 }
209 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10)
210 if templ_7745c5c3_Err != nil {
211 return templ_7745c5c3_Err
212 }
213 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\"><td class=\"c-st\">")
214 if templ_7745c5c3_Err != nil {
215 return templ_7745c5c3_Err
216 }
217 templ_7745c5c3_Err = CheckIcon(r.Kind, r.State).Render(ctx, templ_7745c5c3_Buffer)
218 if templ_7745c5c3_Err != nil {
219 return templ_7745c5c3_Err
220 }
221 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</td><td class=\"c-name\"><a href=\"")
222 if templ_7745c5c3_Err != nil {
223 return templ_7745c5c3_Err
224 }
225 var templ_7745c5c3_Var11 templ.SafeURL
226 templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href))
227 if templ_7745c5c3_Err != nil {
228 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 41, Col: 34}
229 }
230 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
231 if templ_7745c5c3_Err != nil {
232 return templ_7745c5c3_Err
233 }
234 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\">")
235 if templ_7745c5c3_Err != nil {
236 return templ_7745c5c3_Err
237 }
238 var templ_7745c5c3_Var12 string
239 templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(r.Workflow)
240 if templ_7745c5c3_Err != nil {
241 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 41, Col: 49}
242 }
243 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
244 if templ_7745c5c3_Err != nil {
245 return templ_7745c5c3_Err
246 }
247 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</a> <span class=\"mute\">")
248 if templ_7745c5c3_Err != nil {
249 return templ_7745c5c3_Err
250 }
251 var templ_7745c5c3_Var13 string
252 templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(r.Number)
253 if templ_7745c5c3_Err != nil {
254 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 42, Col: 32}
255 }
256 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
257 if templ_7745c5c3_Err != nil {
258 return templ_7745c5c3_Err
259 }
260 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</span> ")
261 if templ_7745c5c3_Err != nil {
262 return templ_7745c5c3_Err
263 }
264 if r.Event != "" {
265 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<span class=\"pill\">")
266 if templ_7745c5c3_Err != nil {
267 return templ_7745c5c3_Err
268 }
269 var templ_7745c5c3_Var14 string
270 templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(r.Event)
271 if templ_7745c5c3_Err != nil {
272 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 44, Col: 32}
273 }
274 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
275 if templ_7745c5c3_Err != nil {
276 return templ_7745c5c3_Err
277 }
278 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</span> ")
279 if templ_7745c5c3_Err != nil {
280 return templ_7745c5c3_Err
281 }
282 }
283 if r.Attempt > 1 {
284 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<span class=\"pill\">attempt ")
285 if templ_7745c5c3_Err != nil {
286 return templ_7745c5c3_Err
287 }
288 var templ_7745c5c3_Var15 string
289 templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(int(r.Attempt)))
290 if templ_7745c5c3_Err != nil {
291 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 47, Col: 53}
292 }
293 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
294 if templ_7745c5c3_Err != nil {
295 return templ_7745c5c3_Err
296 }
297 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</span>")
298 if templ_7745c5c3_Err != nil {
299 return templ_7745c5c3_Err
300 }
301 }
302 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "</td><td class=\"c-sub\"><a href=\"")
303 if templ_7745c5c3_Err != nil {
304 return templ_7745c5c3_Err
305 }
306 var templ_7745c5c3_Var16 templ.SafeURL
307 templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.CHref))
308 if templ_7745c5c3_Err != nil {
309 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 50, Col: 52}
310 }
311 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
312 if templ_7745c5c3_Err != nil {
313 return templ_7745c5c3_Err
314 }
315 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\">")
316 if templ_7745c5c3_Err != nil {
317 return templ_7745c5c3_Err
318 }
319 var templ_7745c5c3_Var17 string
320 templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(r.Short)
321 if templ_7745c5c3_Err != nil {
322 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 50, Col: 64}
323 }
324 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
325 if templ_7745c5c3_Err != nil {
326 return templ_7745c5c3_Err
327 }
328 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</a> ")
329 if templ_7745c5c3_Err != nil {
330 return templ_7745c5c3_Err
331 }
332 var templ_7745c5c3_Var18 string
333 templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(r.Title)
334 if templ_7745c5c3_Err != nil {
335 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 50, Col: 80}
336 }
337 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
338 if templ_7745c5c3_Err != nil {
339 return templ_7745c5c3_Err
340 }
341 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</td><td class=\"c-ref\"><a href=\"")
342 if templ_7745c5c3_Err != nil {
343 return templ_7745c5c3_Err
344 }
345 var templ_7745c5c3_Var19 templ.SafeURL
346 templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.RefHref))
347 if templ_7745c5c3_Err != nil {
348 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 51, Col: 54}
349 }
350 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
351 if templ_7745c5c3_Err != nil {
352 return templ_7745c5c3_Err
353 }
354 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\">")
355 if templ_7745c5c3_Err != nil {
356 return templ_7745c5c3_Err
357 }
358 var templ_7745c5c3_Var20 string
359 templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(r.Ref)
360 if templ_7745c5c3_Err != nil {
361 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 51, Col: 64}
362 }
363 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
364 if templ_7745c5c3_Err != nil {
365 return templ_7745c5c3_Err
366 }
367 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</a></td><td class=\"c-who dim\">")
368 if templ_7745c5c3_Err != nil {
369 return templ_7745c5c3_Err
370 }
371 var templ_7745c5c3_Var21 string
372 templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(r.Actor)
373 if templ_7745c5c3_Err != nil {
374 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 52, Col: 33}
375 }
376 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
377 if templ_7745c5c3_Err != nil {
378 return templ_7745c5c3_Err
379 }
380 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</td><td class=\"c-dur dim\">")
381 if templ_7745c5c3_Err != nil {
382 return templ_7745c5c3_Err
383 }
384 var templ_7745c5c3_Var22 string
385 templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(r.State)
386 if templ_7745c5c3_Err != nil {
387 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 53, Col: 33}
388 }
389 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
390 if templ_7745c5c3_Err != nil {
391 return templ_7745c5c3_Err
392 }
393 var templ_7745c5c3_Var23 string
394 templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
395 if templ_7745c5c3_Err != nil {
396 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 53, Col: 40}
397 }
398 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
399 if templ_7745c5c3_Err != nil {
400 return templ_7745c5c3_Err
401 }
402 var templ_7745c5c3_Var24 string
403 templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(r.Duration)
404 if templ_7745c5c3_Err != nil {
405 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 53, Col: 54}
406 }
407 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
408 if templ_7745c5c3_Err != nil {
409 return templ_7745c5c3_Err
410 }
411 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</td><td class=\"c-when dim\">")
412 if templ_7745c5c3_Err != nil {
413 return templ_7745c5c3_Err
414 }
415 if r.WhenAt != "" {
416 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<time datetime=\"")
417 if templ_7745c5c3_Err != nil {
418 return templ_7745c5c3_Err
419 }
420 var templ_7745c5c3_Var25 string
421 templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt)
422 if templ_7745c5c3_Err != nil {
423 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 56, Col: 29}
424 }
425 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25)
426 if templ_7745c5c3_Err != nil {
427 return templ_7745c5c3_Err
428 }
429 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" title=\"")
430 if templ_7745c5c3_Err != nil {
431 return templ_7745c5c3_Err
432 }
433 var templ_7745c5c3_Var26 string
434 templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt)
435 if templ_7745c5c3_Err != nil {
436 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 56, Col: 48}
437 }
438 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26)
439 if templ_7745c5c3_Err != nil {
440 return templ_7745c5c3_Err
441 }
442 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\">")
443 if templ_7745c5c3_Err != nil {
444 return templ_7745c5c3_Err
445 }
446 var templ_7745c5c3_Var27 string
447 templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(r.When)
448 if templ_7745c5c3_Err != nil {
449 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 56, Col: 59}
450 }
451 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
452 if templ_7745c5c3_Err != nil {
453 return templ_7745c5c3_Err
454 }
455 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</time>")
456 if templ_7745c5c3_Err != nil {
457 return templ_7745c5c3_Err
458 }
459 }
460 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</td></tr>")
461 if templ_7745c5c3_Err != nil {
462 return templ_7745c5c3_Err
463 }
464 return nil
465 })
466}
467
468// RecentActionsBlock is the "Recent actions" section of the summary rail; its
469// id is the target of the live updates. Without a run it is hidden.
470func RecentActionsBlock(a RecentActions) templ.Component {
471 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
472 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
473 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
474 return templ_7745c5c3_CtxErr
475 }
476 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
477 if !templ_7745c5c3_IsBuffer {
478 defer func() {
479 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
480 if templ_7745c5c3_Err == nil {
481 templ_7745c5c3_Err = templ_7745c5c3_BufErr
482 }
483 }()
484 }
485 ctx = templ.InitializeContext(ctx)
486 templ_7745c5c3_Var28 := templ.GetChildren(ctx)
487 if templ_7745c5c3_Var28 == nil {
488 templ_7745c5c3_Var28 = templ.NopComponent
489 }
490 ctx = templ.ClearChildren(ctx)
491 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<section id=\"recent-actions\" aria-labelledby=\"r-actions\"")
492 if templ_7745c5c3_Err != nil {
493 return templ_7745c5c3_Err
494 }
495 if len(a.Runs) == 0 {
496 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, " hidden")
497 if templ_7745c5c3_Err != nil {
498 return templ_7745c5c3_Err
499 }
500 }
501 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "><h2 id=\"r-actions\">Recent actions <a href=\"")
502 if templ_7745c5c3_Err != nil {
503 return templ_7745c5c3_Err
504 }
505 var templ_7745c5c3_Var29 templ.SafeURL
506 templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(a.AllHref))
507 if templ_7745c5c3_Err != nil {
508 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 66, Col: 70}
509 }
510 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
511 if templ_7745c5c3_Err != nil {
512 return templ_7745c5c3_Err
513 }
514 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "\">View all</a></h2><ul class=\"rruns\">")
515 if templ_7745c5c3_Err != nil {
516 return templ_7745c5c3_Err
517 }
518 for _, r := range a.Runs {
519 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<li>")
520 if templ_7745c5c3_Err != nil {
521 return templ_7745c5c3_Err
522 }
523 templ_7745c5c3_Err = CheckIcon(r.Kind, r.State).Render(ctx, templ_7745c5c3_Buffer)
524 if templ_7745c5c3_Err != nil {
525 return templ_7745c5c3_Err
526 }
527 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "<a class=\"rr-name\" href=\"")
528 if templ_7745c5c3_Err != nil {
529 return templ_7745c5c3_Err
530 }
531 var templ_7745c5c3_Var30 templ.SafeURL
532 templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href))
533 if templ_7745c5c3_Err != nil {
534 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 71, Col: 52}
535 }
536 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
537 if templ_7745c5c3_Err != nil {
538 return templ_7745c5c3_Err
539 }
540 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "\" title=\"")
541 if templ_7745c5c3_Err != nil {
542 return templ_7745c5c3_Err
543 }
544 var templ_7745c5c3_Var31 string
545 templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.Workflow + " " + r.Number + " · " + r.State)
546 if templ_7745c5c3_Err != nil {
547 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 71, Col: 109}
548 }
549 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31)
550 if templ_7745c5c3_Err != nil {
551 return templ_7745c5c3_Err
552 }
553 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\">")
554 if templ_7745c5c3_Err != nil {
555 return templ_7745c5c3_Err
556 }
557 var templ_7745c5c3_Var32 string
558 templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(r.Workflow)
559 if templ_7745c5c3_Err != nil {
560 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 71, Col: 124}
561 }
562 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
563 if templ_7745c5c3_Err != nil {
564 return templ_7745c5c3_Err
565 }
566 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</a> <span class=\"mute\">")
567 if templ_7745c5c3_Err != nil {
568 return templ_7745c5c3_Err
569 }
570 var templ_7745c5c3_Var33 string
571 templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(r.Number)
572 if templ_7745c5c3_Err != nil {
573 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 72, Col: 34}
574 }
575 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
576 if templ_7745c5c3_Err != nil {
577 return templ_7745c5c3_Err
578 }
579 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "</span> <a class=\"rr-ref\" href=\"")
580 if templ_7745c5c3_Err != nil {
581 return templ_7745c5c3_Err
582 }
583 var templ_7745c5c3_Var34 templ.SafeURL
584 templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.RefHref))
585 if templ_7745c5c3_Err != nil {
586 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 73, Col: 54}
587 }
588 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
589 if templ_7745c5c3_Err != nil {
590 return templ_7745c5c3_Err
591 }
592 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\">")
593 if templ_7745c5c3_Err != nil {
594 return templ_7745c5c3_Err
595 }
596 var templ_7745c5c3_Var35 string
597 templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(r.Ref)
598 if templ_7745c5c3_Err != nil {
599 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 73, Col: 64}
600 }
601 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
602 if templ_7745c5c3_Err != nil {
603 return templ_7745c5c3_Err
604 }
605 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</a> ")
606 if templ_7745c5c3_Err != nil {
607 return templ_7745c5c3_Err
608 }
609 if r.WhenAt != "" {
610 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<time class=\"dim\" datetime=\"")
611 if templ_7745c5c3_Err != nil {
612 return templ_7745c5c3_Err
613 }
614 var templ_7745c5c3_Var36 string
615 templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt)
616 if templ_7745c5c3_Err != nil {
617 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 75, Col: 43}
618 }
619 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36)
620 if templ_7745c5c3_Err != nil {
621 return templ_7745c5c3_Err
622 }
623 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\" title=\"")
624 if templ_7745c5c3_Err != nil {
625 return templ_7745c5c3_Err
626 }
627 var templ_7745c5c3_Var37 string
628 templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.ResolveAttributeValue(r.WhenAt)
629 if templ_7745c5c3_Err != nil {
630 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 75, Col: 62}
631 }
632 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37)
633 if templ_7745c5c3_Err != nil {
634 return templ_7745c5c3_Err
635 }
636 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\">")
637 if templ_7745c5c3_Err != nil {
638 return templ_7745c5c3_Err
639 }
640 var templ_7745c5c3_Var38 string
641 templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(r.When)
642 if templ_7745c5c3_Err != nil {
643 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 75, Col: 73}
644 }
645 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
646 if templ_7745c5c3_Err != nil {
647 return templ_7745c5c3_Err
648 }
649 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</time>")
650 if templ_7745c5c3_Err != nil {
651 return templ_7745c5c3_Err
652 }
653 }
654 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "</li>")
655 if templ_7745c5c3_Err != nil {
656 return templ_7745c5c3_Err
657 }
658 }
659 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</ul></section>")
660 if templ_7745c5c3_Err != nil {
661 return templ_7745c5c3_Err
662 }
663 return nil
664 })
665}
666
667func RunDetail(l Layout, p RunPage) templ.Component {
668 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
669 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
670 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
671 return templ_7745c5c3_CtxErr
672 }
673 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
674 if !templ_7745c5c3_IsBuffer {
675 defer func() {
676 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
677 if templ_7745c5c3_Err == nil {
678 templ_7745c5c3_Err = templ_7745c5c3_BufErr
679 }
680 }()
681 }
682 ctx = templ.InitializeContext(ctx)
683 templ_7745c5c3_Var39 := templ.GetChildren(ctx)
684 if templ_7745c5c3_Var39 == nil {
685 templ_7745c5c3_Var39 = templ.NopComponent
686 }
687 ctx = templ.ClearChildren(ctx)
688 templ_7745c5c3_Var40 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
689 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
690 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
691 if !templ_7745c5c3_IsBuffer {
692 defer func() {
693 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
694 if templ_7745c5c3_Err == nil {
695 templ_7745c5c3_Err = templ_7745c5c3_BufErr
696 }
697 }()
698 }
699 ctx = templ.InitializeContext(ctx)
700 templ_7745c5c3_Err = LiveSlot("run-notice").Render(ctx, templ_7745c5c3_Buffer)
701 if templ_7745c5c3_Err != nil {
702 return templ_7745c5c3_Err
703 }
704 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, " <div id=\"run-body\">")
705 if templ_7745c5c3_Err != nil {
706 return templ_7745c5c3_Err
707 }
708 templ_7745c5c3_Err = RunBody(p).Render(ctx, templ_7745c5c3_Buffer)
709 if templ_7745c5c3_Err != nil {
710 return templ_7745c5c3_Err
711 }
712 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</div>")
713 if templ_7745c5c3_Err != nil {
714 return templ_7745c5c3_Err
715 }
716 templ_7745c5c3_Err = RunSummaries(p.Summaries, p.SummariesMore).Render(ctx, templ_7745c5c3_Buffer)
717 if templ_7745c5c3_Err != nil {
718 return templ_7745c5c3_Err
719 }
720 return nil
721 })
722 templ_7745c5c3_Err = Shell(l, runRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var40), templ_7745c5c3_Buffer)
723 if templ_7745c5c3_Err != nil {
724 return templ_7745c5c3_Err
725 }
726 return nil
727 })
728}
729
730// runBodyFragment is the body of the run page as a live fragment.
731func runBodyFragment(p RunPage) templ.Component {
732 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
733 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
734 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
735 return templ_7745c5c3_CtxErr
736 }
737 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
738 if !templ_7745c5c3_IsBuffer {
739 defer func() {
740 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
741 if templ_7745c5c3_Err == nil {
742 templ_7745c5c3_Err = templ_7745c5c3_BufErr
743 }
744 }()
745 }
746 ctx = templ.InitializeContext(ctx)
747 templ_7745c5c3_Var41 := templ.GetChildren(ctx)
748 if templ_7745c5c3_Var41 == nil {
749 templ_7745c5c3_Var41 = templ.NopComponent
750 }
751 ctx = templ.ClearChildren(ctx)
752 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<div id=\"run-body\">")
753 if templ_7745c5c3_Err != nil {
754 return templ_7745c5c3_Err
755 }
756 templ_7745c5c3_Err = RunBody(p).Render(ctx, templ_7745c5c3_Buffer)
757 if templ_7745c5c3_Err != nil {
758 return templ_7745c5c3_Err
759 }
760 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "</div>")
761 if templ_7745c5c3_Err != nil {
762 return templ_7745c5c3_Err
763 }
764 return nil
765 })
766}
767
768// RunBody is the jobs of a run, replaced by the live updates.
769func RunBody(p RunPage) templ.Component {
770 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
771 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
772 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
773 return templ_7745c5c3_CtxErr
774 }
775 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
776 if !templ_7745c5c3_IsBuffer {
777 defer func() {
778 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
779 if templ_7745c5c3_Err == nil {
780 templ_7745c5c3_Err = templ_7745c5c3_BufErr
781 }
782 }()
783 }
784 ctx = templ.InitializeContext(ctx)
785 templ_7745c5c3_Var42 := templ.GetChildren(ctx)
786 if templ_7745c5c3_Var42 == nil {
787 templ_7745c5c3_Var42 = templ.NopComponent
788 }
789 ctx = templ.ClearChildren(ctx)
790 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<h2 class=\"run-h\">")
791 if templ_7745c5c3_Err != nil {
792 return templ_7745c5c3_Err
793 }
794 templ_7745c5c3_Err = CheckIcon(p.Kind, p.State).Render(ctx, templ_7745c5c3_Buffer)
795 if templ_7745c5c3_Err != nil {
796 return templ_7745c5c3_Err
797 }
798 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "<span>")
799 if templ_7745c5c3_Err != nil {
800 return templ_7745c5c3_Err
801 }
802 var templ_7745c5c3_Var43 string
803 templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(p.Workflow)
804 if templ_7745c5c3_Err != nil {
805 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 102, Col: 64}
806 }
807 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
808 if templ_7745c5c3_Err != nil {
809 return templ_7745c5c3_Err
810 }
811 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</span> <span class=\"mute\">")
812 if templ_7745c5c3_Err != nil {
813 return templ_7745c5c3_Err
814 }
815 var templ_7745c5c3_Var44 string
816 templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(p.Number)
817 if templ_7745c5c3_Err != nil {
818 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 102, Col: 103}
819 }
820 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
821 if templ_7745c5c3_Err != nil {
822 return templ_7745c5c3_Err
823 }
824 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</span></h2>")
825 if templ_7745c5c3_Err != nil {
826 return templ_7745c5c3_Err
827 }
828 if p.Error != "" {
829 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "<pre class=\"run-err\">")
830 if templ_7745c5c3_Err != nil {
831 return templ_7745c5c3_Err
832 }
833 var templ_7745c5c3_Var45 string
834 templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(p.Error)
835 if templ_7745c5c3_Err != nil {
836 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 104, Col: 32}
837 }
838 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
839 if templ_7745c5c3_Err != nil {
840 return templ_7745c5c3_Err
841 }
842 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</pre>")
843 if templ_7745c5c3_Err != nil {
844 return templ_7745c5c3_Err
845 }
846 }
847 if len(p.Annotations) > 0 {
848 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<section class=\"annots\" aria-labelledby=\"run-annots\"><h3 id=\"run-annots\">Annotations <span class=\"count\">")
849 if templ_7745c5c3_Err != nil {
850 return templ_7745c5c3_Err
851 }
852 var templ_7745c5c3_Var46 string
853 templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Annotations)))
854 if templ_7745c5c3_Err != nil {
855 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 108, Col: 81}
856 }
857 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
858 if templ_7745c5c3_Err != nil {
859 return templ_7745c5c3_Err
860 }
861 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</span></h3>")
862 if templ_7745c5c3_Err != nil {
863 return templ_7745c5c3_Err
864 }
865 templ_7745c5c3_Err = AnnotationList(p.Annotations, p.AnnotationsMore, false).Render(ctx, templ_7745c5c3_Buffer)
866 if templ_7745c5c3_Err != nil {
867 return templ_7745c5c3_Err
868 }
869 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</section>")
870 if templ_7745c5c3_Err != nil {
871 return templ_7745c5c3_Err
872 }
873 }
874 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "<ul class=\"jobs\">")
875 if templ_7745c5c3_Err != nil {
876 return templ_7745c5c3_Err
877 }
878 for _, j := range p.Jobs {
879 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "<li id=\"")
880 if templ_7745c5c3_Err != nil {
881 return templ_7745c5c3_Err
882 }
883 var templ_7745c5c3_Var47 string
884 templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.ResolveAttributeValue("job-" + j.ID)
885 if templ_7745c5c3_Err != nil {
886 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 114, Col: 25}
887 }
888 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var47)
889 if templ_7745c5c3_Err != nil {
890 return templ_7745c5c3_Err
891 }
892 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"><a class=\"job-h\" href=\"")
893 if templ_7745c5c3_Err != nil {
894 return templ_7745c5c3_Err
895 }
896 var templ_7745c5c3_Var48 templ.SafeURL
897 templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(j.Href))
898 if templ_7745c5c3_Err != nil {
899 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 115, Col: 49}
900 }
901 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48))
902 if templ_7745c5c3_Err != nil {
903 return templ_7745c5c3_Err
904 }
905 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "\">")
906 if templ_7745c5c3_Err != nil {
907 return templ_7745c5c3_Err
908 }
909 templ_7745c5c3_Err = CheckIcon(j.Kind, j.State).Render(ctx, templ_7745c5c3_Buffer)
910 if templ_7745c5c3_Err != nil {
911 return templ_7745c5c3_Err
912 }
913 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "<span class=\"j-name\">")
914 if templ_7745c5c3_Err != nil {
915 return templ_7745c5c3_Err
916 }
917 var templ_7745c5c3_Var49 string
918 templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(j.Name)
919 if templ_7745c5c3_Err != nil {
920 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 117, Col: 34}
921 }
922 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
923 if templ_7745c5c3_Err != nil {
924 return templ_7745c5c3_Err
925 }
926 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "</span> <span class=\"dim\">")
927 if templ_7745c5c3_Err != nil {
928 return templ_7745c5c3_Err
929 }
930 var templ_7745c5c3_Var50 string
931 templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(j.State)
932 if templ_7745c5c3_Err != nil {
933 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 118, Col: 32}
934 }
935 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50))
936 if templ_7745c5c3_Err != nil {
937 return templ_7745c5c3_Err
938 }
939 var templ_7745c5c3_Var51 string
940 templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
941 if templ_7745c5c3_Err != nil {
942 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 118, Col: 39}
943 }
944 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
945 if templ_7745c5c3_Err != nil {
946 return templ_7745c5c3_Err
947 }
948 var templ_7745c5c3_Var52 string
949 templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(j.Duration)
950 if templ_7745c5c3_Err != nil {
951 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 118, Col: 53}
952 }
953 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
954 if templ_7745c5c3_Err != nil {
955 return templ_7745c5c3_Err
956 }
957 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "</span></a> ")
958 if templ_7745c5c3_Err != nil {
959 return templ_7745c5c3_Err
960 }
961 if j.Runner != "" {
962 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "<span class=\"mute\">on ")
963 if templ_7745c5c3_Err != nil {
964 return templ_7745c5c3_Err
965 }
966 var templ_7745c5c3_Var53 string
967 templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(runnerText(j))
968 if templ_7745c5c3_Err != nil {
969 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 121, Col: 42}
970 }
971 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53))
972 if templ_7745c5c3_Err != nil {
973 return templ_7745c5c3_Err
974 }
975 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "</span> ")
976 if templ_7745c5c3_Err != nil {
977 return templ_7745c5c3_Err
978 }
979 }
980 if len(j.Needs) > 0 {
981 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, "<span class=\"mute\">needs ")
982 if templ_7745c5c3_Err != nil {
983 return templ_7745c5c3_Err
984 }
985 var templ_7745c5c3_Var54 string
986 templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(joinWords(j.Needs))
987 if templ_7745c5c3_Err != nil {
988 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 124, Col: 50}
989 }
990 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54))
991 if templ_7745c5c3_Err != nil {
992 return templ_7745c5c3_Err
993 }
994 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</span> ")
995 if templ_7745c5c3_Err != nil {
996 return templ_7745c5c3_Err
997 }
998 }
999 if j.Error != "" {
1000 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "<p class=\"job-err\">")
1001 if templ_7745c5c3_Err != nil {
1002 return templ_7745c5c3_Err
1003 }
1004 var templ_7745c5c3_Var55 string
1005 templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(j.Error)
1006 if templ_7745c5c3_Err != nil {
1007 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 127, Col: 33}
1008 }
1009 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55))
1010 if templ_7745c5c3_Err != nil {
1011 return templ_7745c5c3_Err
1012 }
1013 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</p>")
1014 if templ_7745c5c3_Err != nil {
1015 return templ_7745c5c3_Err
1016 }
1017 }
1018 if len(j.Steps) > 0 {
1019 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "<ol class=\"steps\">")
1020 if templ_7745c5c3_Err != nil {
1021 return templ_7745c5c3_Err
1022 }
1023 for _, s := range j.Steps {
1024 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "<li>")
1025 if templ_7745c5c3_Err != nil {
1026 return templ_7745c5c3_Err
1027 }
1028 templ_7745c5c3_Err = CheckIcon(s.Kind, s.State).Render(ctx, templ_7745c5c3_Buffer)
1029 if templ_7745c5c3_Err != nil {
1030 return templ_7745c5c3_Err
1031 }
1032 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<span>")
1033 if templ_7745c5c3_Err != nil {
1034 return templ_7745c5c3_Err
1035 }
1036 var templ_7745c5c3_Var56 string
1037 templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(s.Name)
1038 if templ_7745c5c3_Err != nil {
1039 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 132, Col: 53}
1040 }
1041 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
1042 if templ_7745c5c3_Err != nil {
1043 return templ_7745c5c3_Err
1044 }
1045 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "</span> <span class=\"dim\">")
1046 if templ_7745c5c3_Err != nil {
1047 return templ_7745c5c3_Err
1048 }
1049 var templ_7745c5c3_Var57 string
1050 templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(s.Duration)
1051 if templ_7745c5c3_Err != nil {
1052 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 132, Col: 93}
1053 }
1054 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57))
1055 if templ_7745c5c3_Err != nil {
1056 return templ_7745c5c3_Err
1057 }
1058 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "</span></li>")
1059 if templ_7745c5c3_Err != nil {
1060 return templ_7745c5c3_Err
1061 }
1062 }
1063 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "</ol>")
1064 if templ_7745c5c3_Err != nil {
1065 return templ_7745c5c3_Err
1066 }
1067 }
1068 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "</li>")
1069 if templ_7745c5c3_Err != nil {
1070 return templ_7745c5c3_Err
1071 }
1072 }
1073 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "</ul>")
1074 if templ_7745c5c3_Err != nil {
1075 return templ_7745c5c3_Err
1076 }
1077 return nil
1078 })
1079}
1080
1081// AnnotationList is a list of annotations: the level as a mark with its word,
1082// the job and the step, the title and the message, and file:line. Everything
1083// comes from the workflow and is text. Without grouped, each item names its job (the
1084// run page); grouped lists the annotations by step instead (the job page).
1085func AnnotationList(anns []AnnotationView, more bool, grouped bool) templ.Component {
1086 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
1087 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
1088 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
1089 return templ_7745c5c3_CtxErr
1090 }
1091 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
1092 if !templ_7745c5c3_IsBuffer {
1093 defer func() {
1094 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
1095 if templ_7745c5c3_Err == nil {
1096 templ_7745c5c3_Err = templ_7745c5c3_BufErr
1097 }
1098 }()
1099 }
1100 ctx = templ.InitializeContext(ctx)
1101 templ_7745c5c3_Var58 := templ.GetChildren(ctx)
1102 if templ_7745c5c3_Var58 == nil {
1103 templ_7745c5c3_Var58 = templ.NopComponent
1104 }
1105 ctx = templ.ClearChildren(ctx)
1106 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "<ul class=\"annot-list\">")
1107 if templ_7745c5c3_Err != nil {
1108 return templ_7745c5c3_Err
1109 }
1110 for _, a := range anns {
1111 var templ_7745c5c3_Var59 = []any{"annot", "annot-" + a.Kind}
1112 templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var59...)
1113 if templ_7745c5c3_Err != nil {
1114 return templ_7745c5c3_Err
1115 }
1116 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<li class=\"")
1117 if templ_7745c5c3_Err != nil {
1118 return templ_7745c5c3_Err
1119 }
1120 var templ_7745c5c3_Var60 string
1121 templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var59).String())
1122 if templ_7745c5c3_Err != nil {
1123 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 1, Col: 0}
1124 }
1125 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60)
1126 if templ_7745c5c3_Err != nil {
1127 return templ_7745c5c3_Err
1128 }
1129 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "\">")
1130 if templ_7745c5c3_Err != nil {
1131 return templ_7745c5c3_Err
1132 }
1133 if grouped && a.StepHead {
1134 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<p class=\"annot-step\">")
1135 if templ_7745c5c3_Err != nil {
1136 return templ_7745c5c3_Err
1137 }
1138 if a.StepHref != "" {
1139 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<a href=\"")
1140 if templ_7745c5c3_Err != nil {
1141 return templ_7745c5c3_Err
1142 }
1143 var templ_7745c5c3_Var61 templ.SafeURL
1144 templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(a.StepHref))
1145 if templ_7745c5c3_Err != nil {
1146 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 152, Col: 42}
1147 }
1148 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var61))
1149 if templ_7745c5c3_Err != nil {
1150 return templ_7745c5c3_Err
1151 }
1152 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "\">")
1153 if templ_7745c5c3_Err != nil {
1154 return templ_7745c5c3_Err
1155 }
1156 var templ_7745c5c3_Var62 string
1157 templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(a.Step)
1158 if templ_7745c5c3_Err != nil {
1159 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 152, Col: 53}
1160 }
1161 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62))
1162 if templ_7745c5c3_Err != nil {
1163 return templ_7745c5c3_Err
1164 }
1165 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</a>")
1166 if templ_7745c5c3_Err != nil {
1167 return templ_7745c5c3_Err
1168 }
1169 } else {
1170 var templ_7745c5c3_Var63 string
1171 templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(a.Step)
1172 if templ_7745c5c3_Err != nil {
1173 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 154, Col: 15}
1174 }
1175 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63))
1176 if templ_7745c5c3_Err != nil {
1177 return templ_7745c5c3_Err
1178 }
1179 }
1180 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</p>")
1181 if templ_7745c5c3_Err != nil {
1182 return templ_7745c5c3_Err
1183 }
1184 }
1185 var templ_7745c5c3_Var64 = []any{"an", "an-" + a.Kind}
1186 templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var64...)
1187 if templ_7745c5c3_Err != nil {
1188 return templ_7745c5c3_Err
1189 }
1190 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "<span class=\"")
1191 if templ_7745c5c3_Err != nil {
1192 return templ_7745c5c3_Err
1193 }
1194 var templ_7745c5c3_Var65 string
1195 templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var64).String())
1196 if templ_7745c5c3_Err != nil {
1197 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 1, Col: 0}
1198 }
1199 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var65)
1200 if templ_7745c5c3_Err != nil {
1201 return templ_7745c5c3_Err
1202 }
1203 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "\" role=\"img\" aria-label=\"")
1204 if templ_7745c5c3_Err != nil {
1205 return templ_7745c5c3_Err
1206 }
1207 var templ_7745c5c3_Var66 string
1208 templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.ResolveAttributeValue(a.Level)
1209 if templ_7745c5c3_Err != nil {
1210 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 158, Col: 72}
1211 }
1212 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var66)
1213 if templ_7745c5c3_Err != nil {
1214 return templ_7745c5c3_Err
1215 }
1216 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "\" title=\"")
1217 if templ_7745c5c3_Err != nil {
1218 return templ_7745c5c3_Err
1219 }
1220 var templ_7745c5c3_Var67 string
1221 templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.ResolveAttributeValue(a.Level)
1222 if templ_7745c5c3_Err != nil {
1223 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 158, Col: 90}
1224 }
1225 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var67)
1226 if templ_7745c5c3_Err != nil {
1227 return templ_7745c5c3_Err
1228 }
1229 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "\"></span><div class=\"annot-body\"><p class=\"annot-head\"><span class=\"annot-level\">")
1230 if templ_7745c5c3_Err != nil {
1231 return templ_7745c5c3_Err
1232 }
1233 var templ_7745c5c3_Var68 string
1234 templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(a.Level)
1235 if templ_7745c5c3_Err != nil {
1236 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 161, Col: 41}
1237 }
1238 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68))
1239 if templ_7745c5c3_Err != nil {
1240 return templ_7745c5c3_Err
1241 }
1242 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</span> ")
1243 if templ_7745c5c3_Err != nil {
1244 return templ_7745c5c3_Err
1245 }
1246 if !grouped {
1247 if a.JobHref != "" {
1248 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "<a href=\"")
1249 if templ_7745c5c3_Err != nil {
1250 return templ_7745c5c3_Err
1251 }
1252 var templ_7745c5c3_Var69 templ.SafeURL
1253 templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(a.JobHref))
1254 if templ_7745c5c3_Err != nil {
1255 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 164, Col: 42}
1256 }
1257 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69))
1258 if templ_7745c5c3_Err != nil {
1259 return templ_7745c5c3_Err
1260 }
1261 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "\">")
1262 if templ_7745c5c3_Err != nil {
1263 return templ_7745c5c3_Err
1264 }
1265 var templ_7745c5c3_Var70 string
1266 templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(a.Job)
1267 if templ_7745c5c3_Err != nil {
1268 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 164, Col: 52}
1269 }
1270 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
1271 if templ_7745c5c3_Err != nil {
1272 return templ_7745c5c3_Err
1273 }
1274 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "</a>")
1275 if templ_7745c5c3_Err != nil {
1276 return templ_7745c5c3_Err
1277 }
1278 } else {
1279 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "<span>")
1280 if templ_7745c5c3_Err != nil {
1281 return templ_7745c5c3_Err
1282 }
1283 var templ_7745c5c3_Var71 string
1284 templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(a.Job)
1285 if templ_7745c5c3_Err != nil {
1286 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 166, Col: 21}
1287 }
1288 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71))
1289 if templ_7745c5c3_Err != nil {
1290 return templ_7745c5c3_Err
1291 }
1292 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "</span>")
1293 if templ_7745c5c3_Err != nil {
1294 return templ_7745c5c3_Err
1295 }
1296 }
1297 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, " <span class=\"mute\">")
1298 if templ_7745c5c3_Err != nil {
1299 return templ_7745c5c3_Err
1300 }
1301 var templ_7745c5c3_Var72 string
1302 templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(a.Step)
1303 if templ_7745c5c3_Err != nil {
1304 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 168, Col: 34}
1305 }
1306 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72))
1307 if templ_7745c5c3_Err != nil {
1308 return templ_7745c5c3_Err
1309 }
1310 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "</span> ")
1311 if templ_7745c5c3_Err != nil {
1312 return templ_7745c5c3_Err
1313 }
1314 }
1315 if a.Title != "" {
1316 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "<strong>")
1317 if templ_7745c5c3_Err != nil {
1318 return templ_7745c5c3_Err
1319 }
1320 var templ_7745c5c3_Var73 string
1321 templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(a.Title)
1322 if templ_7745c5c3_Err != nil {
1323 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 171, Col: 24}
1324 }
1325 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73))
1326 if templ_7745c5c3_Err != nil {
1327 return templ_7745c5c3_Err
1328 }
1329 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 107, "</strong>")
1330 if templ_7745c5c3_Err != nil {
1331 return templ_7745c5c3_Err
1332 }
1333 }
1334 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 108, "</p><p class=\"annot-msg\">")
1335 if templ_7745c5c3_Err != nil {
1336 return templ_7745c5c3_Err
1337 }
1338 var templ_7745c5c3_Var74 string
1339 templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(a.Message)
1340 if templ_7745c5c3_Err != nil {
1341 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 174, Col: 37}
1342 }
1343 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))
1344 if templ_7745c5c3_Err != nil {
1345 return templ_7745c5c3_Err
1346 }
1347 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 109, "</p>")
1348 if templ_7745c5c3_Err != nil {
1349 return templ_7745c5c3_Err
1350 }
1351 if a.Where != "" {
1352 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 110, "<p class=\"annot-where\">")
1353 if templ_7745c5c3_Err != nil {
1354 return templ_7745c5c3_Err
1355 }
1356 if a.WhereHref != "" {
1357 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 111, "<a href=\"")
1358 if templ_7745c5c3_Err != nil {
1359 return templ_7745c5c3_Err
1360 }
1361 var templ_7745c5c3_Var75 templ.SafeURL
1362 templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(a.WhereHref))
1363 if templ_7745c5c3_Err != nil {
1364 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 178, Col: 44}
1365 }
1366 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
1367 if templ_7745c5c3_Err != nil {
1368 return templ_7745c5c3_Err
1369 }
1370 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 112, "\">")
1371 if templ_7745c5c3_Err != nil {
1372 return templ_7745c5c3_Err
1373 }
1374 var templ_7745c5c3_Var76 string
1375 templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(a.Where)
1376 if templ_7745c5c3_Err != nil {
1377 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 178, Col: 56}
1378 }
1379 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76))
1380 if templ_7745c5c3_Err != nil {
1381 return templ_7745c5c3_Err
1382 }
1383 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 113, "</a>")
1384 if templ_7745c5c3_Err != nil {
1385 return templ_7745c5c3_Err
1386 }
1387 } else {
1388 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 114, "<span>")
1389 if templ_7745c5c3_Err != nil {
1390 return templ_7745c5c3_Err
1391 }
1392 var templ_7745c5c3_Var77 string
1393 templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(a.Where)
1394 if templ_7745c5c3_Err != nil {
1395 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 180, Col: 23}
1396 }
1397 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var77))
1398 if templ_7745c5c3_Err != nil {
1399 return templ_7745c5c3_Err
1400 }
1401 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 115, "</span>")
1402 if templ_7745c5c3_Err != nil {
1403 return templ_7745c5c3_Err
1404 }
1405 }
1406 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 116, "</p>")
1407 if templ_7745c5c3_Err != nil {
1408 return templ_7745c5c3_Err
1409 }
1410 }
1411 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 117, "</div></li>")
1412 if templ_7745c5c3_Err != nil {
1413 return templ_7745c5c3_Err
1414 }
1415 }
1416 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 118, "</ul>")
1417 if templ_7745c5c3_Err != nil {
1418 return templ_7745c5c3_Err
1419 }
1420 if more {
1421 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 119, "<p class=\"mute\">more annotations exist than are shown.</p>")
1422 if templ_7745c5c3_Err != nil {
1423 return templ_7745c5c3_Err
1424 }
1425 }
1426 return nil
1427 })
1428}
1429
1430// JobAnnotations is the annotations of the job page, replaced by the live
1431// updates; the element exists even when there is none, so that the first one
1432// has something to replace.
1433func JobAnnotations(anns []AnnotationView, more bool) templ.Component {
1434 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
1435 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
1436 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
1437 return templ_7745c5c3_CtxErr
1438 }
1439 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
1440 if !templ_7745c5c3_IsBuffer {
1441 defer func() {
1442 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
1443 if templ_7745c5c3_Err == nil {
1444 templ_7745c5c3_Err = templ_7745c5c3_BufErr
1445 }
1446 }()
1447 }
1448 ctx = templ.InitializeContext(ctx)
1449 templ_7745c5c3_Var78 := templ.GetChildren(ctx)
1450 if templ_7745c5c3_Var78 == nil {
1451 templ_7745c5c3_Var78 = templ.NopComponent
1452 }
1453 ctx = templ.ClearChildren(ctx)
1454 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 120, "<section id=\"job-annotations\" class=\"annots\" aria-label=\"Annotations\">")
1455 if templ_7745c5c3_Err != nil {
1456 return templ_7745c5c3_Err
1457 }
1458 if len(anns) > 0 {
1459 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 121, "<h3>Annotations <span class=\"count\">")
1460 if templ_7745c5c3_Err != nil {
1461 return templ_7745c5c3_Err
1462 }
1463 var templ_7745c5c3_Var79 string
1464 templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(anns)))
1465 if templ_7745c5c3_Err != nil {
1466 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 199, Col: 56}
1467 }
1468 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79))
1469 if templ_7745c5c3_Err != nil {
1470 return templ_7745c5c3_Err
1471 }
1472 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 122, "</span></h3>")
1473 if templ_7745c5c3_Err != nil {
1474 return templ_7745c5c3_Err
1475 }
1476 templ_7745c5c3_Err = AnnotationList(anns, more, true).Render(ctx, templ_7745c5c3_Buffer)
1477 if templ_7745c5c3_Err != nil {
1478 return templ_7745c5c3_Err
1479 }
1480 }
1481 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 123, "</section>")
1482 if templ_7745c5c3_Err != nil {
1483 return templ_7745c5c3_Err
1484 }
1485 return nil
1486 })
1487}
1488
1489// RunSummaries is the job summaries of a run, one block per step that wrote
1490// one. The Markdown is rendered by the README renderer: raw HTML dropped, URLs
1491// filtered, images shown as their alt text.
1492func RunSummaries(sums []JobSummaries, more bool) templ.Component {
1493 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
1494 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
1495 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
1496 return templ_7745c5c3_CtxErr
1497 }
1498 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
1499 if !templ_7745c5c3_IsBuffer {
1500 defer func() {
1501 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
1502 if templ_7745c5c3_Err == nil {
1503 templ_7745c5c3_Err = templ_7745c5c3_BufErr
1504 }
1505 }()
1506 }
1507 ctx = templ.InitializeContext(ctx)
1508 templ_7745c5c3_Var80 := templ.GetChildren(ctx)
1509 if templ_7745c5c3_Var80 == nil {
1510 templ_7745c5c3_Var80 = templ.NopComponent
1511 }
1512 ctx = templ.ClearChildren(ctx)
1513 for _, j := range sums {
1514 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 124, "<section class=\"summaries\" aria-label=\"")
1515 if templ_7745c5c3_Err != nil {
1516 return templ_7745c5c3_Err
1517 }
1518 var templ_7745c5c3_Var81 string
1519 templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.ResolveAttributeValue("Summary of " + j.Job)
1520 if templ_7745c5c3_Err != nil {
1521 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 210, Col: 63}
1522 }
1523 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var81)
1524 if templ_7745c5c3_Err != nil {
1525 return templ_7745c5c3_Err
1526 }
1527 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 125, "\"><h3>")
1528 if templ_7745c5c3_Err != nil {
1529 return templ_7745c5c3_Err
1530 }
1531 if j.JobHref != "" {
1532 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 126, "<a href=\"")
1533 if templ_7745c5c3_Err != nil {
1534 return templ_7745c5c3_Err
1535 }
1536 var templ_7745c5c3_Var82 templ.SafeURL
1537 templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(j.JobHref))
1538 if templ_7745c5c3_Err != nil {
1539 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 213, Col: 39}
1540 }
1541 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82))
1542 if templ_7745c5c3_Err != nil {
1543 return templ_7745c5c3_Err
1544 }
1545 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 127, "\">")
1546 if templ_7745c5c3_Err != nil {
1547 return templ_7745c5c3_Err
1548 }
1549 var templ_7745c5c3_Var83 string
1550 templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(j.Job)
1551 if templ_7745c5c3_Err != nil {
1552 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 213, Col: 49}
1553 }
1554 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83))
1555 if templ_7745c5c3_Err != nil {
1556 return templ_7745c5c3_Err
1557 }
1558 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 128, "</a> ")
1559 if templ_7745c5c3_Err != nil {
1560 return templ_7745c5c3_Err
1561 }
1562 } else {
1563 var templ_7745c5c3_Var84 string
1564 templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(j.Job)
1565 if templ_7745c5c3_Err != nil {
1566 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 215, Col: 12}
1567 }
1568 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84))
1569 if templ_7745c5c3_Err != nil {
1570 return templ_7745c5c3_Err
1571 }
1572 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 129, " ")
1573 if templ_7745c5c3_Err != nil {
1574 return templ_7745c5c3_Err
1575 }
1576 }
1577 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 130, "<span class=\"mute\">summary</span></h3>")
1578 if templ_7745c5c3_Err != nil {
1579 return templ_7745c5c3_Err
1580 }
1581 for _, s := range j.Steps {
1582 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 131, "<article class=\"prose summary\" aria-label=\"")
1583 if templ_7745c5c3_Err != nil {
1584 return templ_7745c5c3_Err
1585 }
1586 var templ_7745c5c3_Var85 string
1587 templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.ResolveAttributeValue(s.Step)
1588 if templ_7745c5c3_Err != nil {
1589 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 220, Col: 54}
1590 }
1591 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var85)
1592 if templ_7745c5c3_Err != nil {
1593 return templ_7745c5c3_Err
1594 }
1595 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 132, "\" hx-ignore><h4 class=\"summary-step\">")
1596 if templ_7745c5c3_Err != nil {
1597 return templ_7745c5c3_Err
1598 }
1599 var templ_7745c5c3_Var86 string
1600 templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(s.Step)
1601 if templ_7745c5c3_Err != nil {
1602 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 221, Col: 38}
1603 }
1604 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86))
1605 if templ_7745c5c3_Err != nil {
1606 return templ_7745c5c3_Err
1607 }
1608 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 133, "</h4>")
1609 if templ_7745c5c3_Err != nil {
1610 return templ_7745c5c3_Err
1611 }
1612 if s.Note != "" {
1613 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 134, "<p class=\"dim\">")
1614 if templ_7745c5c3_Err != nil {
1615 return templ_7745c5c3_Err
1616 }
1617 var templ_7745c5c3_Var87 string
1618 templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.JoinStringErrs(s.Note)
1619 if templ_7745c5c3_Err != nil {
1620 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 223, Col: 29}
1621 }
1622 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87))
1623 if templ_7745c5c3_Err != nil {
1624 return templ_7745c5c3_Err
1625 }
1626 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 135, "</p>")
1627 if templ_7745c5c3_Err != nil {
1628 return templ_7745c5c3_Err
1629 }
1630 } else {
1631 templ_7745c5c3_Err = templ.Raw(s.HTML).Render(ctx, templ_7745c5c3_Buffer)
1632 if templ_7745c5c3_Err != nil {
1633 return templ_7745c5c3_Err
1634 }
1635 }
1636 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 136, "</article>")
1637 if templ_7745c5c3_Err != nil {
1638 return templ_7745c5c3_Err
1639 }
1640 }
1641 if j.More {
1642 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 137, "<p class=\"mute\">the job has more summaries than the first 20, which are shown.</p>")
1643 if templ_7745c5c3_Err != nil {
1644 return templ_7745c5c3_Err
1645 }
1646 }
1647 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 138, "</section>")
1648 if templ_7745c5c3_Err != nil {
1649 return templ_7745c5c3_Err
1650 }
1651 }
1652 if more {
1653 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 139, "<p class=\"mute\">more summaries are not shown: the summaries of the page are over ")
1654 if templ_7745c5c3_Err != nil {
1655 return templ_7745c5c3_Err
1656 }
1657 var templ_7745c5c3_Var88 string
1658 templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(humanSize(maxSummaryPageBytes))
1659 if templ_7745c5c3_Err != nil {
1660 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 235, Col: 115}
1661 }
1662 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88))
1663 if templ_7745c5c3_Err != nil {
1664 return templ_7745c5c3_Err
1665 }
1666 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 140, ".</p>")
1667 if templ_7745c5c3_Err != nil {
1668 return templ_7745c5c3_Err
1669 }
1670 }
1671 return nil
1672 })
1673}
1674
1675func runRail(p RunPage) templ.Component {
1676 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
1677 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
1678 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
1679 return templ_7745c5c3_CtxErr
1680 }
1681 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
1682 if !templ_7745c5c3_IsBuffer {
1683 defer func() {
1684 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
1685 if templ_7745c5c3_Err == nil {
1686 templ_7745c5c3_Err = templ_7745c5c3_BufErr
1687 }
1688 }()
1689 }
1690 ctx = templ.InitializeContext(ctx)
1691 templ_7745c5c3_Var89 := templ.GetChildren(ctx)
1692 if templ_7745c5c3_Var89 == nil {
1693 templ_7745c5c3_Var89 = templ.NopComponent
1694 }
1695 ctx = templ.ClearChildren(ctx)
1696 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 141, "<section aria-labelledby=\"r-run\"><h2 id=\"r-run\">Run</h2><dl class=\"kv\"><dt>result</dt><dd>")
1697 if templ_7745c5c3_Err != nil {
1698 return templ_7745c5c3_Err
1699 }
1700 var templ_7745c5c3_Var90 string
1701 templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinStringErrs(p.State)
1702 if templ_7745c5c3_Err != nil {
1703 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 244, Col: 16}
1704 }
1705 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90))
1706 if templ_7745c5c3_Err != nil {
1707 return templ_7745c5c3_Err
1708 }
1709 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 142, "</dd><dt>event</dt><dd>")
1710 if templ_7745c5c3_Err != nil {
1711 return templ_7745c5c3_Err
1712 }
1713 var templ_7745c5c3_Var91 string
1714 templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(p.Event)
1715 if templ_7745c5c3_Err != nil {
1716 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 246, Col: 16}
1717 }
1718 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91))
1719 if templ_7745c5c3_Err != nil {
1720 return templ_7745c5c3_Err
1721 }
1722 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 143, "</dd><dt>commit</dt><dd><a href=\"")
1723 if templ_7745c5c3_Err != nil {
1724 return templ_7745c5c3_Err
1725 }
1726 var templ_7745c5c3_Var92 templ.SafeURL
1727 templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.CHref))
1728 if templ_7745c5c3_Err != nil {
1729 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 248, Col: 39}
1730 }
1731 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92))
1732 if templ_7745c5c3_Err != nil {
1733 return templ_7745c5c3_Err
1734 }
1735 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 144, "\">")
1736 if templ_7745c5c3_Err != nil {
1737 return templ_7745c5c3_Err
1738 }
1739 var templ_7745c5c3_Var93 string
1740 templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(p.Short)
1741 if templ_7745c5c3_Err != nil {
1742 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 248, Col: 51}
1743 }
1744 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93))
1745 if templ_7745c5c3_Err != nil {
1746 return templ_7745c5c3_Err
1747 }
1748 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 145, "</a></dd><dt>ref</dt><dd><a href=\"")
1749 if templ_7745c5c3_Err != nil {
1750 return templ_7745c5c3_Err
1751 }
1752 var templ_7745c5c3_Var94 templ.SafeURL
1753 templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.RefHref))
1754 if templ_7745c5c3_Err != nil {
1755 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 250, Col: 41}
1756 }
1757 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94))
1758 if templ_7745c5c3_Err != nil {
1759 return templ_7745c5c3_Err
1760 }
1761 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 146, "\">")
1762 if templ_7745c5c3_Err != nil {
1763 return templ_7745c5c3_Err
1764 }
1765 var templ_7745c5c3_Var95 string
1766 templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(p.Ref)
1767 if templ_7745c5c3_Err != nil {
1768 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 250, Col: 51}
1769 }
1770 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95))
1771 if templ_7745c5c3_Err != nil {
1772 return templ_7745c5c3_Err
1773 }
1774 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 147, "</a></dd><dt>actor</dt><dd>")
1775 if templ_7745c5c3_Err != nil {
1776 return templ_7745c5c3_Err
1777 }
1778 var templ_7745c5c3_Var96 string
1779 templ_7745c5c3_Var96, templ_7745c5c3_Err = templ.JoinStringErrs(p.Actor)
1780 if templ_7745c5c3_Err != nil {
1781 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 252, Col: 16}
1782 }
1783 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96))
1784 if templ_7745c5c3_Err != nil {
1785 return templ_7745c5c3_Err
1786 }
1787 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 148, "</dd><dt>attempt</dt><dd>")
1788 if templ_7745c5c3_Err != nil {
1789 return templ_7745c5c3_Err
1790 }
1791 var templ_7745c5c3_Var97 string
1792 templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(int(p.Attempt)))
1793 if templ_7745c5c3_Err != nil {
1794 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 254, Col: 29}
1795 }
1796 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97))
1797 if templ_7745c5c3_Err != nil {
1798 return templ_7745c5c3_Err
1799 }
1800 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 149, " of ")
1801 if templ_7745c5c3_Err != nil {
1802 return templ_7745c5c3_Err
1803 }
1804 var templ_7745c5c3_Var98 string
1805 templ_7745c5c3_Var98, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(int(p.Latest)))
1806 if templ_7745c5c3_Err != nil {
1807 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 254, Col: 56}
1808 }
1809 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var98))
1810 if templ_7745c5c3_Err != nil {
1811 return templ_7745c5c3_Err
1812 }
1813 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 150, "</dd></dl>")
1814 if templ_7745c5c3_Err != nil {
1815 return templ_7745c5c3_Err
1816 }
1817 if len(p.Attempts) > 0 {
1818 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 151, "<ul class=\"attempts\">")
1819 if templ_7745c5c3_Err != nil {
1820 return templ_7745c5c3_Err
1821 }
1822 for _, a := range p.Attempts {
1823 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 152, "<li>")
1824 if templ_7745c5c3_Err != nil {
1825 return templ_7745c5c3_Err
1826 }
1827 if a.Current {
1828 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 153, "<span aria-current=\"page\">")
1829 if templ_7745c5c3_Err != nil {
1830 return templ_7745c5c3_Err
1831 }
1832 var templ_7745c5c3_Var99 string
1833 templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(a.Label)
1834 if templ_7745c5c3_Err != nil {
1835 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 261, Col: 42}
1836 }
1837 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99))
1838 if templ_7745c5c3_Err != nil {
1839 return templ_7745c5c3_Err
1840 }
1841 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 154, "</span>")
1842 if templ_7745c5c3_Err != nil {
1843 return templ_7745c5c3_Err
1844 }
1845 } else {
1846 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 155, "<a href=\"")
1847 if templ_7745c5c3_Err != nil {
1848 return templ_7745c5c3_Err
1849 }
1850 var templ_7745c5c3_Var100 templ.SafeURL
1851 templ_7745c5c3_Var100, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(a.Href))
1852 if templ_7745c5c3_Err != nil {
1853 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 263, Col: 38}
1854 }
1855 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var100))
1856 if templ_7745c5c3_Err != nil {
1857 return templ_7745c5c3_Err
1858 }
1859 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 156, "\">")
1860 if templ_7745c5c3_Err != nil {
1861 return templ_7745c5c3_Err
1862 }
1863 var templ_7745c5c3_Var101 string
1864 templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(a.Label)
1865 if templ_7745c5c3_Err != nil {
1866 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 263, Col: 50}
1867 }
1868 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101))
1869 if templ_7745c5c3_Err != nil {
1870 return templ_7745c5c3_Err
1871 }
1872 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 157, "</a>")
1873 if templ_7745c5c3_Err != nil {
1874 return templ_7745c5c3_Err
1875 }
1876 }
1877 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 158, "</li>")
1878 if templ_7745c5c3_Err != nil {
1879 return templ_7745c5c3_Err
1880 }
1881 }
1882 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 159, "</ul>")
1883 if templ_7745c5c3_Err != nil {
1884 return templ_7745c5c3_Err
1885 }
1886 }
1887 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 160, "</section>")
1888 if templ_7745c5c3_Err != nil {
1889 return templ_7745c5c3_Err
1890 }
1891 if p.CancelAction != "" || p.RerunAction != "" {
1892 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 161, "<section aria-labelledby=\"r-act\" class=\"decide\"><h2 id=\"r-act\">Actions</h2><div class=\"d-btns\">")
1893 if templ_7745c5c3_Err != nil {
1894 return templ_7745c5c3_Err
1895 }
1896 if p.CancelAction != "" {
1897 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 162, "<form method=\"post\" action=\"")
1898 if templ_7745c5c3_Err != nil {
1899 return templ_7745c5c3_Err
1900 }
1901 var templ_7745c5c3_Var102 templ.SafeURL
1902 templ_7745c5c3_Var102, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.CancelAction))
1903 if templ_7745c5c3_Err != nil {
1904 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 275, Col: 63}
1905 }
1906 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var102))
1907 if templ_7745c5c3_Err != nil {
1908 return templ_7745c5c3_Err
1909 }
1910 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 163, "\"><button type=\"submit\" class=\"btn\">Cancel run</button></form>")
1911 if templ_7745c5c3_Err != nil {
1912 return templ_7745c5c3_Err
1913 }
1914 }
1915 if p.RerunAction != "" {
1916 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 164, "<form method=\"post\" action=\"")
1917 if templ_7745c5c3_Err != nil {
1918 return templ_7745c5c3_Err
1919 }
1920 var templ_7745c5c3_Var103 templ.SafeURL
1921 templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.RerunAction))
1922 if templ_7745c5c3_Err != nil {
1923 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 278, Col: 62}
1924 }
1925 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103))
1926 if templ_7745c5c3_Err != nil {
1927 return templ_7745c5c3_Err
1928 }
1929 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 165, "\"><button type=\"submit\" class=\"btn primary\">Re-run all jobs</button></form>")
1930 if templ_7745c5c3_Err != nil {
1931 return templ_7745c5c3_Err
1932 }
1933 }
1934 if p.CanRerunFailed {
1935 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 166, "<form method=\"post\" action=\"")
1936 if templ_7745c5c3_Err != nil {
1937 return templ_7745c5c3_Err
1938 }
1939 var templ_7745c5c3_Var104 templ.SafeURL
1940 templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.RerunFailedAction))
1941 if templ_7745c5c3_Err != nil {
1942 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 281, Col: 68}
1943 }
1944 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104))
1945 if templ_7745c5c3_Err != nil {
1946 return templ_7745c5c3_Err
1947 }
1948 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 167, "\"><button type=\"submit\" class=\"btn\">Re-run failed jobs</button></form>")
1949 if templ_7745c5c3_Err != nil {
1950 return templ_7745c5c3_Err
1951 }
1952 }
1953 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 168, "</div></section>")
1954 if templ_7745c5c3_Err != nil {
1955 return templ_7745c5c3_Err
1956 }
1957 }
1958 return nil
1959 })
1960}
1961
1962// JobHead is the title of the job page with its state and its error, replaced
1963// by the live updates. total is the number of lines the log holds.
1964func JobHead(j JobRow, total int64) templ.Component {
1965 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
1966 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
1967 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
1968 return templ_7745c5c3_CtxErr
1969 }
1970 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
1971 if !templ_7745c5c3_IsBuffer {
1972 defer func() {
1973 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
1974 if templ_7745c5c3_Err == nil {
1975 templ_7745c5c3_Err = templ_7745c5c3_BufErr
1976 }
1977 }()
1978 }
1979 ctx = templ.InitializeContext(ctx)
1980 templ_7745c5c3_Var105 := templ.GetChildren(ctx)
1981 if templ_7745c5c3_Var105 == nil {
1982 templ_7745c5c3_Var105 = templ.NopComponent
1983 }
1984 ctx = templ.ClearChildren(ctx)
1985 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 169, "<div id=\"job-head\" data-total=\"")
1986 if templ_7745c5c3_Err != nil {
1987 return templ_7745c5c3_Err
1988 }
1989 var templ_7745c5c3_Var106 string
1990 templ_7745c5c3_Var106, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa64(total))
1991 if templ_7745c5c3_Err != nil {
1992 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 291, Col: 46}
1993 }
1994 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var106)
1995 if templ_7745c5c3_Err != nil {
1996 return templ_7745c5c3_Err
1997 }
1998 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 170, "\"><h2 class=\"run-h\">")
1999 if templ_7745c5c3_Err != nil {
2000 return templ_7745c5c3_Err
2001 }
2002 templ_7745c5c3_Err = CheckIcon(j.Kind, j.State).Render(ctx, templ_7745c5c3_Buffer)
2003 if templ_7745c5c3_Err != nil {
2004 return templ_7745c5c3_Err
2005 }
2006 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 171, "<span>")
2007 if templ_7745c5c3_Err != nil {
2008 return templ_7745c5c3_Err
2009 }
2010 var templ_7745c5c3_Var107 string
2011 templ_7745c5c3_Var107, templ_7745c5c3_Err = templ.JoinStringErrs(j.Name)
2012 if templ_7745c5c3_Err != nil {
2013 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 292, Col: 61}
2014 }
2015 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var107))
2016 if templ_7745c5c3_Err != nil {
2017 return templ_7745c5c3_Err
2018 }
2019 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 172, "</span> <span class=\"dim\">")
2020 if templ_7745c5c3_Err != nil {
2021 return templ_7745c5c3_Err
2022 }
2023 var templ_7745c5c3_Var108 string
2024 templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinStringErrs(j.State)
2025 if templ_7745c5c3_Err != nil {
2026 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 292, Col: 98}
2027 }
2028 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var108))
2029 if templ_7745c5c3_Err != nil {
2030 return templ_7745c5c3_Err
2031 }
2032 var templ_7745c5c3_Var109 string
2033 templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(" ")
2034 if templ_7745c5c3_Err != nil {
2035 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 292, Col: 105}
2036 }
2037 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var109))
2038 if templ_7745c5c3_Err != nil {
2039 return templ_7745c5c3_Err
2040 }
2041 var templ_7745c5c3_Var110 string
2042 templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(j.Duration)
2043 if templ_7745c5c3_Err != nil {
2044 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 292, Col: 119}
2045 }
2046 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110))
2047 if templ_7745c5c3_Err != nil {
2048 return templ_7745c5c3_Err
2049 }
2050 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 173, "</span></h2>")
2051 if templ_7745c5c3_Err != nil {
2052 return templ_7745c5c3_Err
2053 }
2054 if j.Error != "" {
2055 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 174, "<p class=\"job-err\">")
2056 if templ_7745c5c3_Err != nil {
2057 return templ_7745c5c3_Err
2058 }
2059 var templ_7745c5c3_Var111 string
2060 templ_7745c5c3_Var111, templ_7745c5c3_Err = templ.JoinStringErrs(j.Error)
2061 if templ_7745c5c3_Err != nil {
2062 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 294, Col: 31}
2063 }
2064 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var111))
2065 if templ_7745c5c3_Err != nil {
2066 return templ_7745c5c3_Err
2067 }
2068 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 175, "</p>")
2069 if templ_7745c5c3_Err != nil {
2070 return templ_7745c5c3_Err
2071 }
2072 }
2073 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 176, "</div>")
2074 if templ_7745c5c3_Err != nil {
2075 return templ_7745c5c3_Err
2076 }
2077 return nil
2078 })
2079}
2080
2081// JobSteps is the steps of the job in the rail, replaced by the live updates.
2082func JobSteps(steps []StepView) templ.Component {
2083 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2084 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2085 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
2086 return templ_7745c5c3_CtxErr
2087 }
2088 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2089 if !templ_7745c5c3_IsBuffer {
2090 defer func() {
2091 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2092 if templ_7745c5c3_Err == nil {
2093 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2094 }
2095 }()
2096 }
2097 ctx = templ.InitializeContext(ctx)
2098 templ_7745c5c3_Var112 := templ.GetChildren(ctx)
2099 if templ_7745c5c3_Var112 == nil {
2100 templ_7745c5c3_Var112 = templ.NopComponent
2101 }
2102 ctx = templ.ClearChildren(ctx)
2103 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 177, "<ol class=\"steps\" id=\"job-steps\">")
2104 if templ_7745c5c3_Err != nil {
2105 return templ_7745c5c3_Err
2106 }
2107 for _, s := range steps {
2108 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 178, "<li>")
2109 if templ_7745c5c3_Err != nil {
2110 return templ_7745c5c3_Err
2111 }
2112 templ_7745c5c3_Err = CheckIcon(s.Kind, s.State).Render(ctx, templ_7745c5c3_Buffer)
2113 if templ_7745c5c3_Err != nil {
2114 return templ_7745c5c3_Err
2115 }
2116 if s.LogEnd > s.LogStart {
2117 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 179, "<a href=\"")
2118 if templ_7745c5c3_Err != nil {
2119 return templ_7745c5c3_Err
2120 }
2121 var templ_7745c5c3_Var113 templ.SafeURL
2122 templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("#L" + itoa64(s.LogStart)))
2123 if templ_7745c5c3_Err != nil {
2124 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 306, Col: 55}
2125 }
2126 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var113))
2127 if templ_7745c5c3_Err != nil {
2128 return templ_7745c5c3_Err
2129 }
2130 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 180, "\">")
2131 if templ_7745c5c3_Err != nil {
2132 return templ_7745c5c3_Err
2133 }
2134 var templ_7745c5c3_Var114 string
2135 templ_7745c5c3_Var114, templ_7745c5c3_Err = templ.JoinStringErrs(s.Name)
2136 if templ_7745c5c3_Err != nil {
2137 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 306, Col: 66}
2138 }
2139 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var114))
2140 if templ_7745c5c3_Err != nil {
2141 return templ_7745c5c3_Err
2142 }
2143 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 181, "</a> ")
2144 if templ_7745c5c3_Err != nil {
2145 return templ_7745c5c3_Err
2146 }
2147 } else {
2148 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 182, "<span>")
2149 if templ_7745c5c3_Err != nil {
2150 return templ_7745c5c3_Err
2151 }
2152 var templ_7745c5c3_Var115 string
2153 templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(s.Name)
2154 if templ_7745c5c3_Err != nil {
2155 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 308, Col: 19}
2156 }
2157 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115))
2158 if templ_7745c5c3_Err != nil {
2159 return templ_7745c5c3_Err
2160 }
2161 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 183, "</span> ")
2162 if templ_7745c5c3_Err != nil {
2163 return templ_7745c5c3_Err
2164 }
2165 }
2166 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 184, "<span class=\"dim\">")
2167 if templ_7745c5c3_Err != nil {
2168 return templ_7745c5c3_Err
2169 }
2170 var templ_7745c5c3_Var116 string
2171 templ_7745c5c3_Var116, templ_7745c5c3_Err = templ.JoinStringErrs(s.Duration)
2172 if templ_7745c5c3_Err != nil {
2173 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 310, Col: 34}
2174 }
2175 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var116))
2176 if templ_7745c5c3_Err != nil {
2177 return templ_7745c5c3_Err
2178 }
2179 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "</span></li>")
2180 if templ_7745c5c3_Err != nil {
2181 return templ_7745c5c3_Err
2182 }
2183 }
2184 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "</ol>")
2185 if templ_7745c5c3_Err != nil {
2186 return templ_7745c5c3_Err
2187 }
2188 return nil
2189 })
2190}
2191
2192func Job(l Layout, p JobPage) templ.Component {
2193 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2194 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2195 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
2196 return templ_7745c5c3_CtxErr
2197 }
2198 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2199 if !templ_7745c5c3_IsBuffer {
2200 defer func() {
2201 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2202 if templ_7745c5c3_Err == nil {
2203 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2204 }
2205 }()
2206 }
2207 ctx = templ.InitializeContext(ctx)
2208 templ_7745c5c3_Var117 := templ.GetChildren(ctx)
2209 if templ_7745c5c3_Var117 == nil {
2210 templ_7745c5c3_Var117 = templ.NopComponent
2211 }
2212 ctx = templ.ClearChildren(ctx)
2213 templ_7745c5c3_Var118 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2214 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2215 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2216 if !templ_7745c5c3_IsBuffer {
2217 defer func() {
2218 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2219 if templ_7745c5c3_Err == nil {
2220 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2221 }
2222 }()
2223 }
2224 ctx = templ.InitializeContext(ctx)
2225 templ_7745c5c3_Err = LiveSlot("job-notice").Render(ctx, templ_7745c5c3_Buffer)
2226 if templ_7745c5c3_Err != nil {
2227 return templ_7745c5c3_Err
2228 }
2229 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, " ")
2230 if templ_7745c5c3_Err != nil {
2231 return templ_7745c5c3_Err
2232 }
2233 templ_7745c5c3_Err = JobHead(p.JobRow, p.Total).Render(ctx, templ_7745c5c3_Buffer)
2234 if templ_7745c5c3_Err != nil {
2235 return templ_7745c5c3_Err
2236 }
2237 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, " ")
2238 if templ_7745c5c3_Err != nil {
2239 return templ_7745c5c3_Err
2240 }
2241 templ_7745c5c3_Err = JobAnnotations(p.Annotations, p.AnnotationsMore).Render(ctx, templ_7745c5c3_Buffer)
2242 if templ_7745c5c3_Err != nil {
2243 return templ_7745c5c3_Err
2244 }
2245 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, " <div id=\"job-log\" class=\"joblog\" data-total=\"")
2246 if templ_7745c5c3_Err != nil {
2247 return templ_7745c5c3_Err
2248 }
2249 var templ_7745c5c3_Var119 string
2250 templ_7745c5c3_Var119, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa64(p.Total))
2251 if templ_7745c5c3_Err != nil {
2252 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 321, Col: 63}
2253 }
2254 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var119)
2255 if templ_7745c5c3_Err != nil {
2256 return templ_7745c5c3_Err
2257 }
2258 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "\"")
2259 if templ_7745c5c3_Err != nil {
2260 return templ_7745c5c3_Err
2261 }
2262 if p.Follow {
2263 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, " data-follow")
2264 if templ_7745c5c3_Err != nil {
2265 return templ_7745c5c3_Err
2266 }
2267 }
2268 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, " data-stream=\"")
2269 if templ_7745c5c3_Err != nil {
2270 return templ_7745c5c3_Err
2271 }
2272 var templ_7745c5c3_Var120 string
2273 templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.StreamHref)
2274 if templ_7745c5c3_Err != nil {
2275 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 321, Col: 118}
2276 }
2277 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var120)
2278 if templ_7745c5c3_Err != nil {
2279 return templ_7745c5c3_Err
2280 }
2281 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "\" data-next=\"")
2282 if templ_7745c5c3_Err != nil {
2283 return templ_7745c5c3_Err
2284 }
2285 var templ_7745c5c3_Var121 string
2286 templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa64(p.From + int64(len(p.Lines))))
2287 if templ_7745c5c3_Err != nil {
2288 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 321, Col: 169}
2289 }
2290 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var121)
2291 if templ_7745c5c3_Err != nil {
2292 return templ_7745c5c3_Err
2293 }
2294 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "\">")
2295 if templ_7745c5c3_Err != nil {
2296 return templ_7745c5c3_Err
2297 }
2298 if p.Note != "" {
2299 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "<p class=\"dim\">")
2300 if templ_7745c5c3_Err != nil {
2301 return templ_7745c5c3_Err
2302 }
2303 var templ_7745c5c3_Var122 string
2304 templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(p.Note)
2305 if templ_7745c5c3_Err != nil {
2306 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 323, Col: 27}
2307 }
2308 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122))
2309 if templ_7745c5c3_Err != nil {
2310 return templ_7745c5c3_Err
2311 }
2312 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "</p>")
2313 if templ_7745c5c3_Err != nil {
2314 return templ_7745c5c3_Err
2315 }
2316 }
2317 if p.Prev != "" {
2318 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 197, "<p class=\"more\"><a href=\"")
2319 if templ_7745c5c3_Err != nil {
2320 return templ_7745c5c3_Err
2321 }
2322 var templ_7745c5c3_Var123 templ.SafeURL
2323 templ_7745c5c3_Var123, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Prev))
2324 if templ_7745c5c3_Err != nil {
2325 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 326, Col: 51}
2326 }
2327 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var123))
2328 if templ_7745c5c3_Err != nil {
2329 return templ_7745c5c3_Err
2330 }
2331 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 198, "\" rel=\"prev\">earlier lines</a></p>")
2332 if templ_7745c5c3_Err != nil {
2333 return templ_7745c5c3_Err
2334 }
2335 }
2336 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 199, "<ol class=\"log\" start=\"")
2337 if templ_7745c5c3_Err != nil {
2338 return templ_7745c5c3_Err
2339 }
2340 var templ_7745c5c3_Var124 string
2341 templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa64(p.From + 1))
2342 if templ_7745c5c3_Err != nil {
2343 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 328, Col: 45}
2344 }
2345 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var124)
2346 if templ_7745c5c3_Err != nil {
2347 return templ_7745c5c3_Err
2348 }
2349 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 200, "\">")
2350 if templ_7745c5c3_Err != nil {
2351 return templ_7745c5c3_Err
2352 }
2353 for _, ln := range p.Lines {
2354 templ_7745c5c3_Err = LogLine(ln).Render(ctx, templ_7745c5c3_Buffer)
2355 if templ_7745c5c3_Err != nil {
2356 return templ_7745c5c3_Err
2357 }
2358 }
2359 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 201, "</ol>")
2360 if templ_7745c5c3_Err != nil {
2361 return templ_7745c5c3_Err
2362 }
2363 if p.Next != "" {
2364 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 202, "<p class=\"more\"><a href=\"")
2365 if templ_7745c5c3_Err != nil {
2366 return templ_7745c5c3_Err
2367 }
2368 var templ_7745c5c3_Var125 templ.SafeURL
2369 templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Next))
2370 if templ_7745c5c3_Err != nil {
2371 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 334, Col: 51}
2372 }
2373 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125))
2374 if templ_7745c5c3_Err != nil {
2375 return templ_7745c5c3_Err
2376 }
2377 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 203, "\" rel=\"next\">more lines</a></p>")
2378 if templ_7745c5c3_Err != nil {
2379 return templ_7745c5c3_Err
2380 }
2381 }
2382 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 204, "</div>")
2383 if templ_7745c5c3_Err != nil {
2384 return templ_7745c5c3_Err
2385 }
2386 return nil
2387 })
2388 templ_7745c5c3_Err = Shell(l, jobRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var118), templ_7745c5c3_Buffer)
2389 if templ_7745c5c3_Err != nil {
2390 return templ_7745c5c3_Err
2391 }
2392 return nil
2393 })
2394}
2395
2396// LogLine is a line of the log. Group and error markers of the runner show as
2397// headings and errors, never as raw text.
2398func LogLine(ln LogLineView) templ.Component {
2399 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2400 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2401 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
2402 return templ_7745c5c3_CtxErr
2403 }
2404 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2405 if !templ_7745c5c3_IsBuffer {
2406 defer func() {
2407 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2408 if templ_7745c5c3_Err == nil {
2409 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2410 }
2411 }()
2412 }
2413 ctx = templ.InitializeContext(ctx)
2414 templ_7745c5c3_Var126 := templ.GetChildren(ctx)
2415 if templ_7745c5c3_Var126 == nil {
2416 templ_7745c5c3_Var126 = templ.NopComponent
2417 }
2418 ctx = templ.ClearChildren(ctx)
2419 var templ_7745c5c3_Var127 = []any{logClass(ln)}
2420 templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var127...)
2421 if templ_7745c5c3_Err != nil {
2422 return templ_7745c5c3_Err
2423 }
2424 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 205, "<li id=\"")
2425 if templ_7745c5c3_Err != nil {
2426 return templ_7745c5c3_Err
2427 }
2428 var templ_7745c5c3_Var128 string
2429 templ_7745c5c3_Var128, templ_7745c5c3_Err = templ.ResolveAttributeValue("L" + itoa64(ln.N))
2430 if templ_7745c5c3_Err != nil {
2431 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 343, Col: 28}
2432 }
2433 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var128)
2434 if templ_7745c5c3_Err != nil {
2435 return templ_7745c5c3_Err
2436 }
2437 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 206, "\" class=\"")
2438 if templ_7745c5c3_Err != nil {
2439 return templ_7745c5c3_Err
2440 }
2441 var templ_7745c5c3_Var129 string
2442 templ_7745c5c3_Var129, templ_7745c5c3_Err = templ.ResolveAttributeValue(templ.CSSClasses(templ_7745c5c3_Var127).String())
2443 if templ_7745c5c3_Err != nil {
2444 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 1, Col: 0}
2445 }
2446 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var129)
2447 if templ_7745c5c3_Err != nil {
2448 return templ_7745c5c3_Err
2449 }
2450 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 207, "\" data-step=\"")
2451 if templ_7745c5c3_Err != nil {
2452 return templ_7745c5c3_Err
2453 }
2454 var templ_7745c5c3_Var130 string
2455 templ_7745c5c3_Var130, templ_7745c5c3_Err = templ.ResolveAttributeValue(itoa(int(ln.Step)))
2456 if templ_7745c5c3_Err != nil {
2457 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 343, Col: 84}
2458 }
2459 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var130)
2460 if templ_7745c5c3_Err != nil {
2461 return templ_7745c5c3_Err
2462 }
2463 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 208, "\"")
2464 if templ_7745c5c3_Err != nil {
2465 return templ_7745c5c3_Err
2466 }
2467 if ln.Continued {
2468 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 209, " data-cont")
2469 if templ_7745c5c3_Err != nil {
2470 return templ_7745c5c3_Err
2471 }
2472 }
2473 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 210, "><time>")
2474 if templ_7745c5c3_Err != nil {
2475 return templ_7745c5c3_Err
2476 }
2477 var templ_7745c5c3_Var131 string
2478 templ_7745c5c3_Var131, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Time)
2479 if templ_7745c5c3_Err != nil {
2480 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 343, Col: 130}
2481 }
2482 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var131))
2483 if templ_7745c5c3_Err != nil {
2484 return templ_7745c5c3_Err
2485 }
2486 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 211, "</time><span class=\"t\">")
2487 if templ_7745c5c3_Err != nil {
2488 return templ_7745c5c3_Err
2489 }
2490 var templ_7745c5c3_Var132 string
2491 templ_7745c5c3_Var132, templ_7745c5c3_Err = templ.JoinStringErrs(ln.Text)
2492 if templ_7745c5c3_Err != nil {
2493 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 343, Col: 164}
2494 }
2495 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var132))
2496 if templ_7745c5c3_Err != nil {
2497 return templ_7745c5c3_Err
2498 }
2499 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 212, "</span></li>")
2500 if templ_7745c5c3_Err != nil {
2501 return templ_7745c5c3_Err
2502 }
2503 return nil
2504 })
2505}
2506
2507func jobRail(p JobPage) templ.Component {
2508 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2509 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2510 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
2511 return templ_7745c5c3_CtxErr
2512 }
2513 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2514 if !templ_7745c5c3_IsBuffer {
2515 defer func() {
2516 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2517 if templ_7745c5c3_Err == nil {
2518 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2519 }
2520 }()
2521 }
2522 ctx = templ.InitializeContext(ctx)
2523 templ_7745c5c3_Var133 := templ.GetChildren(ctx)
2524 if templ_7745c5c3_Var133 == nil {
2525 templ_7745c5c3_Var133 = templ.NopComponent
2526 }
2527 ctx = templ.ClearChildren(ctx)
2528 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 213, "<section aria-labelledby=\"r-job\"><h2 id=\"r-job\">Steps</h2>")
2529 if templ_7745c5c3_Err != nil {
2530 return templ_7745c5c3_Err
2531 }
2532 templ_7745c5c3_Err = JobSteps(p.Steps).Render(ctx, templ_7745c5c3_Buffer)
2533 if templ_7745c5c3_Err != nil {
2534 return templ_7745c5c3_Err
2535 }
2536 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 214, "</section><section aria-labelledby=\"r-jobf\"><h2 id=\"r-jobf\">Job</h2><dl class=\"kv\"><dt>run</dt><dd><a href=\"")
2537 if templ_7745c5c3_Err != nil {
2538 return templ_7745c5c3_Err
2539 }
2540 var templ_7745c5c3_Var134 templ.SafeURL
2541 templ_7745c5c3_Var134, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.RunHref))
2542 if templ_7745c5c3_Err != nil {
2543 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 355, Col: 41}
2544 }
2545 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var134))
2546 if templ_7745c5c3_Err != nil {
2547 return templ_7745c5c3_Err
2548 }
2549 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 215, "\">")
2550 if templ_7745c5c3_Err != nil {
2551 return templ_7745c5c3_Err
2552 }
2553 var templ_7745c5c3_Var135 string
2554 templ_7745c5c3_Var135, templ_7745c5c3_Err = templ.JoinStringErrs(p.RunName)
2555 if templ_7745c5c3_Err != nil {
2556 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 355, Col: 55}
2557 }
2558 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var135))
2559 if templ_7745c5c3_Err != nil {
2560 return templ_7745c5c3_Err
2561 }
2562 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 216, "</a></dd>")
2563 if templ_7745c5c3_Err != nil {
2564 return templ_7745c5c3_Err
2565 }
2566 if p.Runner != "" {
2567 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 217, "<dt>runner</dt><dd>")
2568 if templ_7745c5c3_Err != nil {
2569 return templ_7745c5c3_Err
2570 }
2571 var templ_7745c5c3_Var136 string
2572 templ_7745c5c3_Var136, templ_7745c5c3_Err = templ.JoinStringErrs(p.Runner)
2573 if templ_7745c5c3_Err != nil {
2574 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 358, Col: 18}
2575 }
2576 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var136))
2577 if templ_7745c5c3_Err != nil {
2578 return templ_7745c5c3_Err
2579 }
2580 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 218, "</dd>")
2581 if templ_7745c5c3_Err != nil {
2582 return templ_7745c5c3_Err
2583 }
2584 }
2585 if p.Isolation != "" {
2586 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 219, "<dt>isolation</dt><dd>")
2587 if templ_7745c5c3_Err != nil {
2588 return templ_7745c5c3_Err
2589 }
2590 var templ_7745c5c3_Var137 string
2591 templ_7745c5c3_Var137, templ_7745c5c3_Err = templ.JoinStringErrs(p.Isolation)
2592 if templ_7745c5c3_Err != nil {
2593 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 362, Col: 21}
2594 }
2595 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var137))
2596 if templ_7745c5c3_Err != nil {
2597 return templ_7745c5c3_Err
2598 }
2599 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 220, "</dd>")
2600 if templ_7745c5c3_Err != nil {
2601 return templ_7745c5c3_Err
2602 }
2603 }
2604 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 221, "<dt>lines</dt><dd>")
2605 if templ_7745c5c3_Err != nil {
2606 return templ_7745c5c3_Err
2607 }
2608 var templ_7745c5c3_Var138 string
2609 templ_7745c5c3_Var138, templ_7745c5c3_Err = templ.JoinStringErrs(itoa64(p.Total))
2610 if templ_7745c5c3_Err != nil {
2611 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 365, Col: 24}
2612 }
2613 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var138))
2614 if templ_7745c5c3_Err != nil {
2615 return templ_7745c5c3_Err
2616 }
2617 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 222, "</dd></dl><p><a href=\"")
2618 if templ_7745c5c3_Err != nil {
2619 return templ_7745c5c3_Err
2620 }
2621 var templ_7745c5c3_Var139 templ.SafeURL
2622 templ_7745c5c3_Var139, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.RawHref))
2623 if templ_7745c5c3_Err != nil {
2624 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 367, Col: 39}
2625 }
2626 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var139))
2627 if templ_7745c5c3_Err != nil {
2628 return templ_7745c5c3_Err
2629 }
2630 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 223, "\">raw log</a></p></section>")
2631 if templ_7745c5c3_Err != nil {
2632 return templ_7745c5c3_Err
2633 }
2634 return nil
2635 })
2636}
2637
2638// CommitChecks is the combined state of the checks of a commit, as a mark
2639// with a count, linking to the page that explains it.
2640func CommitChecks(c ChecksSummary) templ.Component {
2641 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2642 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2643 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
2644 return templ_7745c5c3_CtxErr
2645 }
2646 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2647 if !templ_7745c5c3_IsBuffer {
2648 defer func() {
2649 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2650 if templ_7745c5c3_Err == nil {
2651 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2652 }
2653 }()
2654 }
2655 ctx = templ.InitializeContext(ctx)
2656 templ_7745c5c3_Var140 := templ.GetChildren(ctx)
2657 if templ_7745c5c3_Var140 == nil {
2658 templ_7745c5c3_Var140 = templ.NopComponent
2659 }
2660 ctx = templ.ClearChildren(ctx)
2661 if c.Total > 0 {
2662 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 224, "<a class=\"ck-sum\" href=\"")
2663 if templ_7745c5c3_Err != nil {
2664 return templ_7745c5c3_Err
2665 }
2666 var templ_7745c5c3_Var141 templ.SafeURL
2667 templ_7745c5c3_Var141, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(c.Href))
2668 if templ_7745c5c3_Err != nil {
2669 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 375, Col: 48}
2670 }
2671 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var141))
2672 if templ_7745c5c3_Err != nil {
2673 return templ_7745c5c3_Err
2674 }
2675 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 225, "\" title=\"")
2676 if templ_7745c5c3_Err != nil {
2677 return templ_7745c5c3_Err
2678 }
2679 var templ_7745c5c3_Var142 string
2680 templ_7745c5c3_Var142, templ_7745c5c3_Err = templ.ResolveAttributeValue(c.Title)
2681 if templ_7745c5c3_Err != nil {
2682 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 375, Col: 66}
2683 }
2684 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var142)
2685 if templ_7745c5c3_Err != nil {
2686 return templ_7745c5c3_Err
2687 }
2688 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 226, "\">")
2689 if templ_7745c5c3_Err != nil {
2690 return templ_7745c5c3_Err
2691 }
2692 templ_7745c5c3_Err = CheckIcon(c.Kind, c.State).Render(ctx, templ_7745c5c3_Buffer)
2693 if templ_7745c5c3_Err != nil {
2694 return templ_7745c5c3_Err
2695 }
2696 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 227, "<span class=\"mute\">")
2697 if templ_7745c5c3_Err != nil {
2698 return templ_7745c5c3_Err
2699 }
2700 var templ_7745c5c3_Var143 string
2701 templ_7745c5c3_Var143, templ_7745c5c3_Err = templ.JoinStringErrs(c.Label)
2702 if templ_7745c5c3_Err != nil {
2703 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 377, Col: 31}
2704 }
2705 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var143))
2706 if templ_7745c5c3_Err != nil {
2707 return templ_7745c5c3_Err
2708 }
2709 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 228, "</span></a>")
2710 if templ_7745c5c3_Err != nil {
2711 return templ_7745c5c3_Err
2712 }
2713 }
2714 return nil
2715 })
2716}
2717
2718// MRChecks is the checks section of the rail of a merge request.
2719func MRChecks(c ChecksSection) templ.Component {
2720 return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
2721 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
2722 if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
2723 return templ_7745c5c3_CtxErr
2724 }
2725 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
2726 if !templ_7745c5c3_IsBuffer {
2727 defer func() {
2728 templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
2729 if templ_7745c5c3_Err == nil {
2730 templ_7745c5c3_Err = templ_7745c5c3_BufErr
2731 }
2732 }()
2733 }
2734 ctx = templ.InitializeContext(ctx)
2735 templ_7745c5c3_Var144 := templ.GetChildren(ctx)
2736 if templ_7745c5c3_Var144 == nil {
2737 templ_7745c5c3_Var144 = templ.NopComponent
2738 }
2739 ctx = templ.ClearChildren(ctx)
2740 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 229, "<section aria-labelledby=\"r-checks\" id=\"mr-checks\"><h2 id=\"r-checks\">Checks <span class=\"count\">")
2741 if templ_7745c5c3_Err != nil {
2742 return templ_7745c5c3_Err
2743 }
2744 var templ_7745c5c3_Var145 string
2745 templ_7745c5c3_Var145, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(c.Rows)))
2746 if templ_7745c5c3_Err != nil {
2747 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 385, Col: 66}
2748 }
2749 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var145))
2750 if templ_7745c5c3_Err != nil {
2751 return templ_7745c5c3_Err
2752 }
2753 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 230, "</span></h2>")
2754 if templ_7745c5c3_Err != nil {
2755 return templ_7745c5c3_Err
2756 }
2757 if len(c.Rows) == 0 {
2758 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 231, "<p class=\"dim\">no checks</p>")
2759 if templ_7745c5c3_Err != nil {
2760 return templ_7745c5c3_Err
2761 }
2762 } else {
2763 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 232, "<ul class=\"checks\">")
2764 if templ_7745c5c3_Err != nil {
2765 return templ_7745c5c3_Err
2766 }
2767 for _, r := range c.Rows {
2768 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 233, "<li>")
2769 if templ_7745c5c3_Err != nil {
2770 return templ_7745c5c3_Err
2771 }
2772 templ_7745c5c3_Err = CheckIcon(r.Kind, r.State).Render(ctx, templ_7745c5c3_Buffer)
2773 if templ_7745c5c3_Err != nil {
2774 return templ_7745c5c3_Err
2775 }
2776 if r.Href != "" {
2777 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 234, "<a href=\"")
2778 if templ_7745c5c3_Err != nil {
2779 return templ_7745c5c3_Err
2780 }
2781 var templ_7745c5c3_Var146 templ.SafeURL
2782 templ_7745c5c3_Var146, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(r.Href))
2783 if templ_7745c5c3_Err != nil {
2784 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 394, Col: 38}
2785 }
2786 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var146))
2787 if templ_7745c5c3_Err != nil {
2788 return templ_7745c5c3_Err
2789 }
2790 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 235, "\">")
2791 if templ_7745c5c3_Err != nil {
2792 return templ_7745c5c3_Err
2793 }
2794 var templ_7745c5c3_Var147 string
2795 templ_7745c5c3_Var147, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name)
2796 if templ_7745c5c3_Err != nil {
2797 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 394, Col: 49}
2798 }
2799 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var147))
2800 if templ_7745c5c3_Err != nil {
2801 return templ_7745c5c3_Err
2802 }
2803 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 236, "</a> ")
2804 if templ_7745c5c3_Err != nil {
2805 return templ_7745c5c3_Err
2806 }
2807 } else {
2808 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 237, "<span>")
2809 if templ_7745c5c3_Err != nil {
2810 return templ_7745c5c3_Err
2811 }
2812 var templ_7745c5c3_Var148 string
2813 templ_7745c5c3_Var148, templ_7745c5c3_Err = templ.JoinStringErrs(r.Name)
2814 if templ_7745c5c3_Err != nil {
2815 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 396, Col: 21}
2816 }
2817 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var148))
2818 if templ_7745c5c3_Err != nil {
2819 return templ_7745c5c3_Err
2820 }
2821 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 238, "</span> ")
2822 if templ_7745c5c3_Err != nil {
2823 return templ_7745c5c3_Err
2824 }
2825 }
2826 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 239, "<span class=\"dim\">")
2827 if templ_7745c5c3_Err != nil {
2828 return templ_7745c5c3_Err
2829 }
2830 var templ_7745c5c3_Var149 string
2831 templ_7745c5c3_Var149, templ_7745c5c3_Err = templ.JoinStringErrs(r.State)
2832 if templ_7745c5c3_Err != nil {
2833 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 398, Col: 33}
2834 }
2835 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var149))
2836 if templ_7745c5c3_Err != nil {
2837 return templ_7745c5c3_Err
2838 }
2839 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 240, "</span> ")
2840 if templ_7745c5c3_Err != nil {
2841 return templ_7745c5c3_Err
2842 }
2843 if r.Waiting {
2844 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 241, "<span class=\"mute\">waiting for a runner</span>")
2845 if templ_7745c5c3_Err != nil {
2846 return templ_7745c5c3_Err
2847 }
2848 }
2849 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 242, "</li>")
2850 if templ_7745c5c3_Err != nil {
2851 return templ_7745c5c3_Err
2852 }
2853 }
2854 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 243, "</ul>")
2855 if templ_7745c5c3_Err != nil {
2856 return templ_7745c5c3_Err
2857 }
2858 }
2859 if c.Note != "" {
2860 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 244, "<p class=\"mute\">")
2861 if templ_7745c5c3_Err != nil {
2862 return templ_7745c5c3_Err
2863 }
2864 var templ_7745c5c3_Var150 string
2865 templ_7745c5c3_Var150, templ_7745c5c3_Err = templ.JoinStringErrs(c.Note)
2866 if templ_7745c5c3_Err != nil {
2867 return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/actions.templ`, Line: 407, Col: 27}
2868 }
2869 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var150))
2870 if templ_7745c5c3_Err != nil {
2871 return templ_7745c5c3_Err
2872 }
2873 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 245, "</p>")
2874 if templ_7745c5c3_Err != nil {
2875 return templ_7745c5c3_Err
2876 }
2877 }
2878 templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 246, "</section>")
2879 if templ_7745c5c3_Err != nil {
2880 return templ_7745c5c3_Err
2881 }
2882 return nil
2883 })
2884}
2885
2886var _ = templruntime.GeneratedTemplate