cairn/web/templates/pages/campaign_detail.html

64 lines
2.0 KiB
HTML

{{define "content"}}
<div class="campaign-detail">
<div class="detail-header">
<span class="badge badge-campaign-{{.Campaign.Status}}">{{.Campaign.Status}}</span>
<span class="detail-repo">{{.Campaign.RepoName}}</span>
</div>
<h3>{{.Campaign.Name}}</h3>
<div class="detail-grid">
<div class="detail-item">
<label>Type</label>
<span>{{.Campaign.Type}}</span>
</div>
<div class="detail-item">
<label>Artifacts</label>
<span>{{.Campaign.ArtifactCount}}</span>
</div>
<div class="detail-item">
<label>Started</label>
<span>{{timeAgo .Campaign.StartedAt}}</span>
</div>
{{if .Campaign.FinishedAt}}
<div class="detail-item">
<label>Finished</label>
<span>{{timeAgo (derefTime .Campaign.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 campaign yet.</p>
{{end}}
</section>
</div>
{{end}}