GameOver1337 / GitClone Public
К репозиторию
3.9 KB
templates/build.html
3.9 KB
1{{define "title"}}Сборка #{{.BuildID}}{{end}}
2{{define "content"}}
3{{if .Repo}}
4<div class="repo-topline">
5 <a class="repo-topline-link" href="/{{.Repo.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">{{.Repo.Owner.Username}}</span>
10 <span class="repo-topline-sep">/</span>
11 <strong class="repo-topline-name">{{.Repo.Name}}</strong>
12 </a>
13 {{if .Repo.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?repo={{.Repo.CloneURL}}">Все сборки</a>
20</div>
21
22<nav class="repo-tabs" aria-label="Разделы репозитория">
23 <a href="/{{.Repo.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={{.Repo.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="/{{.Repo.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>Сборка #{{.BuildID}}</h1>
39</div>
40{{end}}
41
42<div class="box build-summary">
43 <div class="box-header build-summary-header">
44 <div class="build-title">
45 <span>Сборка #{{.BuildID}}</span>
46 {{buildStatus .Build.Status}}
47 <span class="badge">{{.Build.BuildType}}</span>
48 </div>
49 <div class="build-actions">
50 <a class="btn btn-sm" href="/builds">← К сборкам</a>
51 {{if .Repo}}
52 <form method="POST" action="/api/build/{{.Repo.CloneURL}}" class="inline-form">
53 <input type="hidden" name="csrf_token" value="{{.CSRF}}">
54 <input type="hidden" name="branch" value="{{.Build.Branch}}">
55 <button type="submit" class="btn btn-sm">Перезапустить</button>
56 </form>
57 {{end}}
58 </div>
59 </div>
60 <div class="box-body build-meta">
61 <span>Ветка: <code class="commit-hash">{{.Build.Branch}}</code></span>
62 <span>Начало: {{.Build.StartedAt.Format "02.01.2006 15:04:05"}}</span>
63 {{if .Build.FinishedAt}}<span>Завершено: {{.Build.FinishedAt.Format "02.01.2006 15:04:05"}}</span>{{end}}
64 </div>
65</div>
66
67{{if eq .Build.Status "running"}}
68<div class="flash flash-attention">Сборка выполняется… страница обновится автоматически.</div>
69<script>setTimeout(function () { location.reload(); }, 2000);</script>
70{{end}}
71
72<div class="box log-box">
73 <div class="box-header">
74 <h2>Лог сборки</h2>
75 <span class="text-small muted">Вывод команды</span>
76 </div>
77 <pre class="build-log">{{.BuildLog}}</pre>
78</div>
79{{end}}