morffix/tmpl/tasks.tmpl
2024-05-09 19:08:10 +02:00

52 lines
No EOL
1.2 KiB
Cheetah

{{template "head"}}
<h2>New Tasks</h2>
<form method="POST">
<label for="library">Library:</label><br />
<select id="library" name="library">
{{range $l := .Libraries}}
<option value="{{$l.ID}}">{{$l.Name}}</option>
{{end}}
</select><br />
<label for="type">Type</label><br />
<select id="type" name="type">
<option value="0">Health Check</option>
</select> <br />
<input type="submit">
</form>
<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 onclick="window.location='/tasks/{{ $t.ID }}';">
<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"}}