cairn/web/templates/pages/run_detail.html

66 lines
2.1 KiB
HTML

{{define "content"}}
<div class="run-detail">
<div class="detail-header">
<span class="badge badge-run-{{.Run.Status}}">{{.Run.Status}}</span>
<span class="detail-repo">{{.Run.RepoName}} / {{.Run.TargetName}}</span>
</div>
<div class="detail-grid">
<div class="detail-item">
<label>Target</label>
<span>{{.Run.TargetName}}</span>
</div>
<div class="detail-item">
<label>Commit</label>
<span><code>{{shortSHA .Run.CommitSHA}}</code></span>
</div>
<div class="detail-item">
<label>Artifacts</label>
<span>{{.Run.ArtifactCount}}</span>
</div>
<div class="detail-item">
<label>Started</label>
<span>{{timeAgo .Run.StartedAt}}</span>
</div>
{{if .Run.FinishedAt}}
<div class="detail-item">
<label>Finished</label>
<span>{{timeAgo (derefTime .Run.FinishedAt)}}</span>
</div>
{{end}}
</div>
<section class="section">
<h3>Artifacts</h3>
{{if .Artifacts}}
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Commit</th>
<th>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><code>{{shortSHA .CommitSHA}}</code></td>
<td>{{if .CrashMessage}}{{truncate (deref .CrashMessage) 60}}{{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>
{{else}}
<p class="empty-state">No artifacts in this run.</p>
{{end}}
</section>
</div>
{{end}}