Add stats page
All checks were successful
/ release (push) Successful in 29s

This commit is contained in:
Samuel Lorch 2024-07-13 01:45:43 +02:00
parent 8ba0e8f2ab
commit 0f5d842a64
6 changed files with 77 additions and 2 deletions

View file

@ -77,4 +77,4 @@
<input type="checkbox" name="health_ok_queue_transcode">
<input type="submit" value="Submit">
</form>
{{template "tail"}}
{{template "tail"}}

View file

@ -4,5 +4,6 @@
<a class="button" href="/libraries">Libraries</a>
<a class="button" href="/tasks">Tasks</a>
<a class="button" href="/ffmpeg_commands">FFmpeg Commands</a>
<a class="button" href="/stats">Stats</a>
</nav>
{{end}}
{{end}}

22
tmpl/stats.tmpl Normal file
View file

@ -0,0 +1,22 @@
{{template "head"}}
<h2>Stats</h2>
<h2>Codec Counts</h2>
<div>
<table>
<tr>
<th>Codec</th>
<th>Count</th>
</tr>
{{range $f := .CodecCounts}}
<tr>
<td>
{{ $f.Codec }}
</td>
<td>
{{ $f.Count }}
</td>
</tr>
{{end}}
</table>
</div>
{{template "tail"}}