move ffmpeg command to seperate table

This commit is contained in:
Samuel Lorch 2024-06-23 22:47:50 +02:00
parent 72dfd2408f
commit cdeb266e38
20 changed files with 245 additions and 84 deletions

32
tmpl/ffmpeg_commands.tmpl Normal file
View file

@ -0,0 +1,32 @@
{{template "head"}}
<h2>New FFmpeg Command</h2>
<form method="POST">
<label>Name:</label>
<input type="text" name="name">
<label>Data:</label>
<input type="text" name="data">
<input type="submit" value="Submit">
</form>
<h2>FFmpeg Commands:</h2>
<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Data</th>
</tr>
{{range $t := .FfmpegCommands}}
<tr onclick="window.location='/ffmpeg_commands/{{ $t.ID }}';">
<td>
{{ $t.ID }}
</td>
<td>
{{ $t.Name }}
</td>
<td>
{{ $t.Data }}
</td>
</tr>
{{end}}
</table>
{{template "tail"}}

View file

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

View file

@ -16,8 +16,14 @@
</select>
<label for="type">Type</label>
<select id="type" name="type">
<option value="0">Health Check</option>
<option value="1">Transcode</option>
<option value="0">Health Check</option>
<option value="1">Transcode</option>
</select>
<label for="ffmpeg_command">FFmpeg Command:</label>
<select id="ffmpeg_command" name="ffmpeg_command">
{{range $l := .FfmpegCommands}}
<option value="{{$l.ID}}">{{$l.Name}}</option>
{{end}}
</select>
<input type="submit" value="Submit">
</form>
@ -42,6 +48,7 @@ Total: {{.Stats.TotalCount}}
<th>Library</th>
<th>Worker</th>
<th>Type</th>
<th>FFmpeg Command</th>
<th>Status</th>
<th>File</th>
<th>Updated At</th>
@ -60,6 +67,9 @@ Total: {{.Stats.TotalCount}}
<td>
{{ $t.Type }}
</td>
<td>
{{ $t.FfmpegCommand }}
</td>
<td>
{{ $t.Status }}
</td>