49 lines
1.5 KiB
HTML
49 lines
1.5 KiB
HTML
{{define "content"}}
|
|
<div class="artifacts-page">
|
|
<div class="toolbar">
|
|
<span class="result-count">{{.Total}} artifacts</span>
|
|
</div>
|
|
|
|
{{if .Artifacts}}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Repository</th>
|
|
<th>Commit</th>
|
|
<th>Crash Message</th>
|
|
<th>Size</th>
|
|
<th>Created</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Artifacts}}
|
|
<tr>
|
|
<td><span class="badge badge-{{.Type}}">{{.Type}}</span></td>
|
|
<td>{{.RepoName}}</td>
|
|
<td><code>{{shortSHA .CommitSHA}}</code></td>
|
|
<td>{{if .CrashMessage}}{{truncate (deref .CrashMessage) 80}}{{else}}-{{end}}</td>
|
|
<td>{{formatSize .BlobSize}}</td>
|
|
<td>{{timeAgo .CreatedAt}}</td>
|
|
<td><a href="/artifacts/{{.ID}}" class="btn btn-sm">View</a></td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
|
|
{{if gt .Total .Limit}}
|
|
<div class="pagination">
|
|
{{if gt .Offset 0}}
|
|
<a href="?offset={{.Offset}}&limit={{.Limit}}" class="btn">Previous</a>
|
|
{{end}}
|
|
{{$nextOffset := (printf "%d" (len .Artifacts))}}
|
|
<a href="?offset={{$nextOffset}}&limit={{.Limit}}" class="btn">Next</a>
|
|
</div>
|
|
{{end}}
|
|
{{else}}
|
|
<p class="empty-state">No artifacts found.</p>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|