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