internal/web/templates/build.html

4a511e42574ead9c92dc73fd320f296cc4dbea07
gitbay/internal/web/templates/build.html

34 lines · 2520 bytes

 1{{define "width"}}wide{{end}}
 2{{define "title"}}build {{.Build.Number}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<div id="build-root">
 5{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
 6<div class="headrow">
 7<h1>Build {{.Build.Number}} <span class="chip check-{{.Build.Status}}">{{.Build.Status}}</span></h1>
 8<span class="spacer"></span>
 9<div class="btngroup">
10{{if not .Live}}<button type="button" class="btn" data-refresh="self" data-refresh-target="build-root">Refresh</button>{{end}}
11{{if and .CanWrite (not .Live) .Build.Job (ne .Build.Status "pending") (ne .Build.Status "running")}}
12<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds" class="inline">
13  <input type="hidden" name="job" value="{{.Build.Job}}">
14  <button type="submit" class="btn">Run {{.Build.Job}} on {{.Repo.DefaultBranch}}</button>
15</form>
16{{end}}
17{{if and .CanWrite (or (eq .Build.Status "pending") (eq .Build.Status "running"))}}
18<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds/{{.Build.Number}}/cancel" class="inline">
19  <button type="submit" class="danger">{{if eq .Build.Status "running"}}Cancel (stops at the runner's next check){{else}}Cancel{{end}}</button>
20</form>
21{{end}}
22</div>
23</div>
24<p class="meta">{{.Build.Job}} on {{.Build.Ref}} · <code><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/commit/{{.Build.SHA}}">{{printf "%.10s" .Build.SHA}}</a></code> · queued {{when .Build.CreatedAt}}{{if .Build.FinishedAt}} · finished {{when .Build.FinishedAt}}{{with .Duration}} · ran {{.}}{{end}}{{end}}{{if .Failed}} · <a href="#failed">Jump to failure</a>{{end}}</p>
25{{if .Live}}<p class="meta">This page updates itself until the build ends. If it stops without a “build finished” line, reload to pick it up again. <a href="?follow=0">Show it without updates</a></p>
26<pre class="code buildlog" tabindex="0">{{.Log}}</pre>
27{{else if .Steps}}{{$total := len .Build.Steps}}{{range .Steps}}
28<details class="difffold buildstep"{{if .Failed}} id="failed" open{{end}}>
29  <summary>{{if .N}}<span>step {{.N}}/{{$total}}</span> <code>{{.Head}}</code>{{else}}<span>setup</span>{{end}}{{if .Failed}} <span class="chip check-failure">failed</span>{{end}}</summary>
30  <pre class="code buildlog" tabindex="0">{{if .TextHTML}}{{.TextHTML}}{{else}}{{.Text}}{{end}}</pre>
31</details>{{end}}
32{{else if .Log}}<pre class="code buildlog" tabindex="0">{{if .LogHTML}}{{.LogHTML}}{{else}}{{.Log}}{{end}}</pre>{{else}}<p class="empty-note">no log yet</p>{{end}}
33</div>
34{{end}}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form