Index Use Sub Templates, Show Tasks

This commit is contained in:
Samuel Lorch 2024-05-05 01:29:07 +02:00
parent c9abf3aa88
commit fe0c712447

View file

@ -1,18 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="/static/style/style.css">
</head>
<body>
<h1>Morffix</h1>
<div id="wierd-flex" class="counter">
{{template "head"}}
<div id="wierd-flex" class="counter">
{{range $c := .Counter}}
<img class="counter-image" alt="{{$c}}" src="/static/counter/{{$c}}.gif">
{{end}}
</div>
<div class="worker-list">
</div>
<h2>Workers</h2>
<div class="worker-list">
{{range $w := .Workers}}
<div class="worker">
<h4>{{ $w.Name }}</h4>
@ -78,6 +71,41 @@
</table>
</div>
{{end}}
</div>
</body>
</html>
</div>
<p>
<h2>Tasks</h2>
<div class="task-list">
<table>
<tr>
<th>ID</th>
<th>Library</th>
<th>Worker</th>
<th>Type</th>
<th>Status</th>
<th>File</th>
</tr>
{{range $t := .Tasks}}
<tr>
<td>
{{ $t.ID }}
</td>
<td>
{{ $t.Library }}
</td>
<td>
{{ $t.Worker }}
</td>
<td>
{{ $t.Type }}
</td>
<td>
{{ $t.Status }}
</td>
<td>
{{ $t.File }}
</td>
</tr>
{{end}}
</table>
</div>
{{template "tail"}}