Add ability to browse data

This commit is contained in:
2025-03-24 12:26:31 +01:00
parent c459148d33
commit dbfbd6e164
9 changed files with 272 additions and 5 deletions

View File

@@ -1,9 +1,32 @@
{{- /*gotype: main.IndexVM */}}
{{define "index"}}
{{template "header"}}
Some statistics:
<h2>Some statistics</h2>
<ul>
<li>Database contains {{.AssetCount}} assets.</li>
<li>Database contains {{.BrandCount}} brands.</li>
</ul>
<h2>Filter Devices</h2>
<form action="/browse" method="get">
<h3>Select Brands:</h3>
{{range .Brands}}
<label>
<input type="checkbox" name="brand" checked value="{{.}}">
{{.}}
</label><br>
{{end}}
<h3>Select Types:</h3>
{{range .Types}}
<label>
<input type="checkbox" name="type" checked value="{{.}}">
{{. | formatType}}
</label><br>
{{end}}
<button type="submit">Browse</button>
</form>
{{template "footer"}}
{{end}}