56 lines
No EOL
1.7 KiB
HTML
56 lines
No EOL
1.7 KiB
HTML
{{define "title"}}
|
|
GoWatch
|
|
{{end}}
|
|
|
|
{{define "content"}}
|
|
{{ if .warnings }}
|
|
<div class="h3 text-center text-danger" id="logHeader">Startup Warnings</div>
|
|
<table class="table table-striped table-hover">
|
|
<tbody>
|
|
{{ range .warnings }}
|
|
<tr>
|
|
<td class="h5 text-center text-danger">{{ . }}</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
{{ end }}
|
|
<table class="table table-striped table-hover">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Last Run</th>
|
|
<th>Next Run</th>
|
|
<th>Last Value</th>
|
|
<th>Edit</th>
|
|
<th>Delete</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .watches }}
|
|
<tr class="pointer" onclick="window.location='/watch/view/{{ .ID }}'">
|
|
<td class="h3">{{ .Name }}</td>
|
|
{{ if .CronEntry }}
|
|
<td class="h3">{{ .CronEntry.Prev.Format "2006-01-02 15:04:05" }}</td>
|
|
<td class="h3">{{ .CronEntry.Next.Format "2006-01-02 15:04:05" }}</td>
|
|
|
|
{{ else }}
|
|
<td class="h3" colspan="2">No schedule (Add cron filter)</td>
|
|
{{ end }}
|
|
<td class="h3">
|
|
{{ .LastValue }}
|
|
</td>
|
|
<td>
|
|
<a href="/watch/edit/{{ .ID }}" class="btn btn-success">Edit</a>
|
|
</td>
|
|
<td>
|
|
<form action="/watch/delete" method="post">
|
|
<input type="hidden" name="watch_id" value="{{ .ID }}">
|
|
<input type="submit" class="btn btn-danger" value="Delete">
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
{{end}} |