Add UI console and spare forecast naming
This commit is contained in:
47
internal/api/ui_failures.tmpl
Normal file
47
internal/api/ui_failures.tmpl
Normal file
@@ -0,0 +1,47 @@
|
||||
{{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}}
|
||||
Reference in New Issue
Block a user