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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
| {% import ( "{{{ .Package }}}/app" "{{{ .Package }}}/app/controller/cutil" "{{{ .Package }}}/app/lib/audit" "{{{ .Package }}}/app/lib/filter" "{{{ .Package }}}/views/components" "{{{ .Package }}}/views/layout" ) %}
{% code type Detail struct { layout.Basic Model *audit.Audit Params filter.ParamSet Records audit.Records } %}
{% func (p *Detail) Body(as *app.State, ps *cutil.PageState) %} <div class="card"> <div class="right"> <a href="#modal-audit"><button type="button">JSON</button></a> <a href="{%s p.Model.WebPath() %}/edit"><button>Edit</button></a> </div> <h3>{%= components.SVGRefIcon(`cog`, ps) %} Audit [{%s p.Model.String() %}]</h3> <div class="overflow full-width"> <table class="mt"> <tbody> <tr> <th class="shrink" title="UUID in format (00000000-0000-0000-0000-000000000000)">ID</th> <td>{%= components.DisplayUUID(&p.Model.ID) %}</td> </tr> <tr> <th class="shrink" title="String text">App</th> <td>{%s p.Model.App %}</td> </tr> <tr> <th class="shrink" title="String text">Act</th> <td>{%s p.Model.Act %}</td> </tr> <tr> <th class="shrink" title="String text">Client</th> <td>{%s p.Model.Client %}</td> </tr> <tr> <th class="shrink" title="String text">Server</th> <td>{%s p.Model.Server %}</td> </tr> <tr> <th class="shrink" title="String text">User</th> <td>{%s p.Model.User %}</td> </tr> <tr> <th class="shrink" title="JSON object">Metadata</th> <td>{%= components.JSON(p.Model.Metadata) %}</td> </tr> <tr> <th class="shrink" title="String text">Message</th> <td>{%s p.Model.Message %}</td> </tr> <tr> <th class="shrink" title="Date and time, in almost any format">Started</th> <td>{%= components.DisplayTimestamp(&p.Model.Started) %}</td> </tr> <tr> <th class="shrink" title="Date and time, in almost any format">Completed</th> <td>{%= components.DisplayTimestamp(&p.Model.Completed) %}</td> </tr> </tbody> </table> </div> </div> {%- comment %}$PF_SECTION_START(extra)${% endcomment -%} {%- comment %}$PF_SECTION_END(extra)${% endcomment -%} {%- if len(p.Records) > 0 -%} <div class="card"> <h3>{%= components.SVGRefIcon(`cog`, ps) %} Audit Records</h3> {%= RecordTable(p.Records, p.Params, as, ps) %} </div> {%- endif -%} {%= components.JSONModal("audit", "Audit JSON", p.Model, 1) %} {% endfunc %}
|