- Format dates as YYYY-MM-DD with full timestamp on hover - Add breadcrumb navigation with hospital icon (🏥) across all pages - Restructure main menu with grouped dropdowns: * Hardware (Assets, Components) * Health (Tickets, Failures, Analytics) * Settings (Ingest) - Make table rows clickable on Dashboard, Assets, and Components pages - Add new Customers page with list view - Improve dropdown menu stability with JS hover delay Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
90 lines
2.8 KiB
Cheetah
90 lines
2.8 KiB
Cheetah
{{define "index"}}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
{{template "head" .}}
|
|
<body>
|
|
{{template "topbar" .}}
|
|
|
|
<main class="container">
|
|
<section class="card">
|
|
<h2>Registry Snapshot</h2>
|
|
<div class="stats">
|
|
<div class="stat"><span>Customers</span><strong>{{.CustomerCount}}</strong></div>
|
|
<div class="stat"><span>Projects</span><strong>{{.ProjectCount}}</strong></div>
|
|
<div class="stat"><span>Assets</span><strong>{{.AssetCount}}</strong></div>
|
|
<div class="stat"><span>Components</span><strong>{{.ComponentCount}}</strong></div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Latest Assets</h2>
|
|
{{if .Assets}}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Vendor Serial</th>
|
|
<th>Project</th>
|
|
<th>Location</th>
|
|
<th>Created</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range $i, $item := .Assets}}
|
|
{{if lt $i 5}}
|
|
<tr class="clickable" onclick="navigateToRow('/ui/assets/{{$item.ID}}')">
|
|
<td><a href="/ui/assets/{{$item.ID}}">{{$item.ID}}</a></td>
|
|
<td>{{$item.Name}}</td>
|
|
<td>{{$item.VendorSerial}}</td>
|
|
<td>{{$item.ProjectID}}</td>
|
|
<td>{{if $item.LocationID}}{{$item.LocationID}}{{else}}—{{end}}</td>
|
|
<td title="{{formatTimeFull $item.CreatedAt}}">{{formatTime $item.CreatedAt}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<div class="meta">No assets yet.</div>
|
|
{{end}}
|
|
<div class="meta"><a href="/ui/assets">View all assets</a></div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Latest Components</h2>
|
|
{{if .Components}}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Vendor Serial</th>
|
|
<th>Lot</th>
|
|
<th>First Seen</th>
|
|
<th>Created</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range $i, $item := .Components}}
|
|
{{if lt $i 5}}
|
|
<tr class="clickable" onclick="navigateToRow('/ui/components/{{$item.ID}}')">
|
|
<td><a href="/ui/components/{{$item.ID}}">{{$item.ID}}</a></td>
|
|
<td>{{$item.VendorSerial}}</td>
|
|
<td>{{if $item.LotID}}{{$item.LotID}}{{else}}—{{end}}</td>
|
|
<td title="{{formatTimePtrFull $item.FirstSeenAt}}">{{formatTimePtr $item.FirstSeenAt}}</td>
|
|
<td title="{{formatTimeFull $item.CreatedAt}}">{{formatTime $item.CreatedAt}}</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
{{else}}
|
|
<div class="meta">No components yet.</div>
|
|
{{end}}
|
|
<div class="meta"><a href="/ui/components">View all components</a></div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
{{end}}
|