This repository has been archived on 2019-06-27. You can view files and clone it, but cannot push or open issues/pull-requests.
am/templates/log.html

59 lines
1.4 KiB
HTML

-------------------------------------------------------------------------------
-- List
-------------------------------------------------------------------------------
{{define "LogList" -}}
{{template "PageStart"}}
<h1>Log</h1>
<section>
<form>
<select Name="Type">
<option value="all" {{if (eq .Args.Type "all")}}selected{{end}}>Type: All</option>
<option value="alert" {{if (eq .Args.Type "alert")}}selected{{end}}>Type: Alerts</option>
<option value="log" {{if (eq .Args.Type "log")}}selected{{end}}>Type: Non-alerts</option>
</select>
<select Name="SourceID">
<option value="">Source: All</option>
{{range .Sources}}
<option value="{{.SourceID}}" {{if (eq .SourceID $.Args.SourceID)}}selected{{end}}>
Source: {{.Name}}
</option>
{{end}}
</select>
<input type="submit" value="Submit">
</form>
{{if .Args.BeforeID}}
<p><a href="javascript:history.back()">Back</a></p>
{{end}}
<table>
<tr>
<th>Time</th>
<th> </th>
<th>Source</th>
<th>Text</th>
</tr>
{{range .Entries}}
<tr>
<td>{{.TS.Format "2006-01-02 15:04"}}
</td>
<td>{{if .Alert}}<b>!</b>{{end}}</td>
<td><a href="/source/view/{{.SourceID}}">{{.SourceName}}</a></td>
<td style="width:100%;">{{.Text}}</td>
</tr>
{{end}}
</table>
{{if .NextURL}}
<p><a href="{{.NextURL}}">More</a></p>{{end}}
</section>
{{template "PageEnd"}}
{{- end}}