Audit

/views/vaudit/Table.html (2.0 KB)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% import (
"{{{ .Package }}}/app"
"{{{ .Package }}}/app/controller/cutil"
"{{{ .Package }}}/app/lib/audit"
"{{{ .Package }}}/app/lib/filter"
"{{{ .Package }}}/views/components"
) %}

{% func Table(models audit.Audits, params filter.ParamSet, as *app.State, ps *cutil.PageState) %}
{%- code prms := params.Get("audit", nil, ps.Logger) -%}
<div class="overflow full-width">
<table class="mt">
<thead>
<tr>
{%= components.TableHeaderSimple("audit", "id", "ID", "UUID in format (00000000-0000-0000-0000-000000000000)", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "app", "App", "String text", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "act", "Action", "String text", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "client", "Client", "String text", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "server", "Server", "String text", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "user", "User", "String text", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "started", "Started", "Date and time, in almost any format", prms, ps.URI, ps) %}
{%= components.TableHeaderSimple("audit", "completed", "Completed", "Date and time, in almost any format", prms, ps.URI, ps) %}
</tr>
</thead>
<tbody>
{%- for _, model := range models -%}
<tr>
<td><a href="/admin/audit/{%= components.DisplayUUID(&model.ID) %}">{%= components.DisplayUUID(&model.ID) %}</a></td>
<td>{%s model.App %}</td>
<td>{%s model.Act %}</td>
<td>{%s model.Client %}</td>
<td>{%s model.Server %}</td>
<td>{%s model.User %}</td>
<td>{%= components.DisplayTimestamp(&model.Started) %}</td>
<td>{%= components.DisplayTimestamp(&model.Completed) %}</td>
</tr>
{%- endfor -%}
</tbody>
</table>
</div>
{% endfunc %}