Add Tasks

This commit is contained in:
Samuel Lorch 2024-05-05 01:32:51 +02:00
parent 5e15311d49
commit a0f3d5e439
3 changed files with 151 additions and 0 deletions

40
tmpl/tasks.tmpl Normal file
View file

@ -0,0 +1,40 @@
{{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>Type</th>
<th>File</th>
</tr>
{{range $t := .Tasks}}
<tr onclick="window.location='/tasks/{{ $t.ID }}';">
<td>
{{ $t.ID }}
</td>
<td>
{{ $t.Type }}
</td>
<td>
{{ $t.File }}
</td>
</tr>
{{end}}
</table>
</div>
{{template "tail"}}