templates/builds.html
4.7 KB
| 1 | {{define "title"}}{{if .FilterRepo}}{{.FilterRepo.Name}} · сборки{{else}}Сборки{{end}}{{end}} |
| 2 | {{define "content"}} |
| 3 | {{if .FilterRepo}} |
| 4 | <div class="repo-topline"> |
| 5 | <a class="repo-topline-link" href="/{{.FilterRepo.CloneURL}}"> |
| 6 | <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"> |
| 7 | <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"/> |
| 8 | </svg> |
| 9 | <span class="repo-topline-owner">{{.FilterRepo.Owner.Username}}</span> |
| 10 | <span class="repo-topline-sep">/</span> |
| 11 | <strong class="repo-topline-name">{{.FilterRepo.Name}}</strong> |
| 12 | </a> |
| 13 | {{if .FilterRepo.IsPrivate}} |
| 14 | <span class="badge badge-outline">Private</span> |
| 15 | {{else}} |
| 16 | <span class="badge badge-outline">Public</span> |
| 17 | {{end}} |
| 18 | <div class="toolbar-spacer"></div> |
| 19 | <a class="btn btn-sm" href="/builds">Все сборки</a> |
| 20 | </div> |
| 21 | |
| 22 | <nav class="repo-tabs" aria-label="Разделы репозитория"> |
| 23 | <a href="/{{.FilterRepo.CloneURL}}"> |
| 24 | <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 1 1-1.06 1.06L.47 8.53a.75.75 0 0 1 0-1.06Z"/></svg> |
| 25 | Code |
| 26 | </a> |
| 27 | <a class="active" href="/builds?repo={{.FilterRepo.CloneURL}}"> |
| 28 | <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"/></svg> |
| 29 | Actions |
| 30 | </a> |
| 31 | <a href="/{{.FilterRepo.CloneURL}}/releases"> |
| 32 | <svg class="octicon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16ZM4.5 8.5l2.5 2.5 4.5-4.5a1 1 0 0 0-1.414-1.414L6.99 8.172 5.914 7.086A1 1 0 0 0 4.5 8.5Z"/></svg> |
| 33 | Releases |
| 34 | </a> |
| 35 | </nav> |
| 36 | {{else}} |
| 37 | <div class="page-heading"> |
| 38 | <h1>Сборки</h1> |
| 39 | </div> |
| 40 | {{end}} |
| 41 | |
| 42 | <div class="box"> |
| 43 | <div class="box-header"> |
| 44 | <h2>{{if .FilterRepo}}История запусков{{else}}Все сборки{{end}}</h2> |
| 45 | <span class="counter">{{len .Rows}}</span> |
| 46 | </div> |
| 47 | |
| 48 | {{if .Rows}} |
| 49 | <table class="data-table actions-table"> |
| 50 | <thead> |
| 51 | <tr> |
| 52 | <th scope="col">Запуск</th> |
| 53 | <th scope="col">Репозиторий</th> |
| 54 | <th scope="col">Ветка</th> |
| 55 | <th scope="col">Тип</th> |
| 56 | <th scope="col">Статус</th> |
| 57 | <th scope="col">Начало</th> |
| 58 | </tr> |
| 59 | </thead> |
| 60 | <tbody> |
| 61 | {{range .Rows}} |
| 62 | <tr> |
| 63 | <td><a href="/build/{{.B.ID}}" class="build-link">#{{.B.ID}}</a></td> |
| 64 | <td> |
| 65 | {{if .Repo}} |
| 66 | <a href="/{{.Repo.CloneURL}}">{{.Repo.Owner.Username}} / {{.Repo.Name}}</a> |
| 67 | {{else}} |
| 68 | <span class="muted">—</span> |
| 69 | {{end}} |
| 70 | </td> |
| 71 | <td> |
| 72 | <span class="branch-label"> |
| 73 | <svg class="octicon" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"/></svg> |
| 74 | {{.B.Branch}} |
| 75 | </span> |
| 76 | </td> |
| 77 | <td><span class="badge">{{.B.BuildType}}</span></td> |
| 78 | <td>{{buildStatus .B.Status}}</td> |
| 79 | <td class="muted text-small">{{.B.StartedAt.Format "02.01.2006 15:04"}}</td> |
| 80 | </tr> |
| 81 | {{end}} |
| 82 | </tbody> |
| 83 | </table> |
| 84 | {{else}} |
| 85 | <div class="empty-state"> |
| 86 | <svg width="24" height="24" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"/></svg> |
| 87 | <h3>Сборок пока нет</h3> |
| 88 | <p>Запустите сборку со страницы репозитория.</p> |
| 89 | </div> |
| 90 | {{end}} |
| 91 | </div> |
| 92 | {{end}} |