Files
core/internal/api/ui_failures.tmpl

48 lines
1.2 KiB
Cheetah

{{define "failures"}}
<!DOCTYPE html>
<html lang="en">
{{template "head" .}}
<body>
{{template "topbar" .}}
<main class="container">
<section class="card">
<h2>Failure Events</h2>
{{if .Failures}}
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Source</th>
<th>External</th>
<th>Component</th>
<th>Asset</th>
<th>Type</th>
<th>Failure Time</th>
<th>Confidence</th>
</tr>
</thead>
<tbody>
{{range .Failures}}
<tr>
<td>{{.ID}}</td>
<td>{{.Source}}</td>
<td>{{.ExternalID}}</td>
<td><a href="/ui/components/{{.ComponentID}}">{{.ComponentID}}</a></td>
<td>{{if .AssetID}}<a href="/ui/assets/{{.AssetID}}">{{.AssetID}}</a>{{else}}—{{end}}</td>
<td>{{.FailureType}}</td>
<td>{{formatTime .FailureTime}}</td>
<td>{{formatFloatPtr .Confidence 2}}</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<div class="meta">No failures ingested yet.</div>
{{end}}
</section>
</main>
</body>
</html>
{{end}}