59 lines
2.0 KiB
Cheetah
59 lines
2.0 KiB
Cheetah
{{define "failures"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
{{template "head" .}}
|
|
<body>
|
|
{{template "topbar" .}}
|
|
{{template "breadcrumbs" .}}
|
|
|
|
<main class="container">
|
|
<section class="card">
|
|
<h2>Failure Events</h2>
|
|
{{if .FailureGroups}}
|
|
{{range .FailureGroups}}
|
|
<details open style="margin-bottom: 18px;">
|
|
<summary class="meta" style="margin-bottom: 8px; cursor: pointer;">
|
|
<span class="badge {{assetStatusClass .AssetStatus}}">{{assetStatusText .AssetStatus}}</span>
|
|
Asset {{if .AssetID}}<a href="/ui/assets/{{.AssetID}}" onclick="event.stopPropagation()">{{.AssetLabel}}</a>{{else}}—{{end}} · Vendor {{.AssetVendor}} · Model {{.AssetModel}} · SN {{.AssetSN}} · {{len .Failures}} events
|
|
</summary>
|
|
<table class="table" style="table-layout: fixed; width: 100%;">
|
|
<colgroup>
|
|
<col style="width: 28%;" />
|
|
<col style="width: 17%;" />
|
|
<col style="width: 27%;" />
|
|
<col style="width: 14%;" />
|
|
<col style="width: 14%;" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Component Status</th>
|
|
<th>Component</th>
|
|
<th>Type</th>
|
|
<th>Confidence</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range .Failures}}
|
|
<tr>
|
|
<td>{{formatTimeFull .FailureTime}}</td>
|
|
<td><span class="badge {{componentStatusClass (index $.ComponentStatusByID .PartID)}}">{{componentStatusText (index $.ComponentStatusByID .PartID)}}</span></td>
|
|
<td><a href="/ui/components/{{.PartID}}">{{componentLabelByID .PartID $.ComponentLabelByID}}</a></td>
|
|
<td>{{.FailureType}}</td>
|
|
<td>{{formatFloatPtr .Confidence 2}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</details>
|
|
{{end}}
|
|
{{template "pagination" .Pager}}
|
|
{{else}}
|
|
<div class="meta">No failures ingested yet.</div>
|
|
{{end}}
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
{{end}}
|