81 lines
2.6 KiB
HTML
81 lines
2.6 KiB
HTML
{{define "content"}}
|
|
<div class="dashboard">
|
|
<div class="stats-row">
|
|
<div class="stat-card">
|
|
<span class="stat-value">{{.TotalArtifacts}}</span>
|
|
<span class="stat-label">Artifacts</span>
|
|
</div>
|
|
<div class="stat-card">
|
|
<span class="stat-value">{{len .Repositories}}</span>
|
|
<span class="stat-label">Repositories</span>
|
|
</div>
|
|
<div class="stat-card">
|
|
<span class="stat-value">{{.TotalCrashGroups}}</span>
|
|
<span class="stat-label">Crash Groups</span>
|
|
</div>
|
|
<div class="stat-card">
|
|
<span class="stat-value">{{.OpenCrashGroups}}</span>
|
|
<span class="stat-label">Open</span>
|
|
</div>
|
|
</div>
|
|
|
|
{{if .TopCrashers}}
|
|
<section class="section">
|
|
<h3>Top Crashers</h3>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Repository</th>
|
|
<th>Occurrences</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .TopCrashers}}
|
|
<tr>
|
|
<td>{{.Title}}</td>
|
|
<td>{{.RepoName}}</td>
|
|
<td>{{.OccurrenceCount}}</td>
|
|
<td><a href="/crashgroups/{{.CrashGroupID}}" class="btn btn-sm">View</a></td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{{end}}
|
|
|
|
<section class="section">
|
|
<h3>Recent Artifacts</h3>
|
|
{{if .Artifacts}}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Repository</th>
|
|
<th>Commit</th>
|
|
<th>Message</th>
|
|
<th>Size</th>
|
|
<th>Created</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) 60}}{{else}}-{{end}}</td>
|
|
<td>{{formatSize .BlobSize}}</td>
|
|
<td>{{timeAgo .CreatedAt}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<p class="empty-state">No artifacts yet. Use <code>cairn upload</code> to ingest your first artifact.</p>
|
|
{{end}}
|
|
</section>
|
|
</div>
|
|
{{end}}
|