1
- {{template "p /header" .}}
1
+ {{template "partials /header" .}}
2
2
3
3
< main class ="container ">
4
4
< article >
5
5
< h2 > Recent Envelopes</ h2 >
6
6
< figure >
7
- {{template "p/recent-envelopes-table" .}}
7
+ {{block "recent-envelopes-table" .}}
8
+ < table hx-trigger ="every 5s, deletedEnvelopes from:body, trimmed from:body " hx-get ="/p/recent-envelopes-table "
9
+ hx-swap ="outerHTML ">
10
+ < tbody >
11
+ {{range $val := .Messages}}
12
+ < tr >
13
+ < td class ="text-left ">
14
+ < a href ="/envelopes/{{$val.ID}} "> {{$val.Subject}}</ a >
15
+ </ td >
16
+ < td class ="text-right ">
17
+ < a href ="/envelopes/{{$val.ID}} " title ="{{timeFormat $val.CreatedAt}} ">
18
+ {{timeHumanize $val.CreatedAt}}
19
+ </ a >
20
+ </ td >
21
+ </ tr >
22
+ {{end}}
23
+ </ tbody >
24
+ </ table >
25
+ {{end}}
8
26
</ figure >
9
27
</ article >
10
28
11
- < article id =" storage " >
29
+ < article >
12
30
< h2 > Storage</ h2 >
13
- < figure > {{template "p/storage-table" .}}</ figure >
31
+ < figure >
32
+ {{block "storage-table" .}}
33
+ < table hx-trigger ="every 5s, vacuumed from:body, trimmed from:body, deletedEnvelopes from:body "
34
+ hx-get ="/p/storage-table " hx-swap ="outerHTML ">
35
+ < tbody >
36
+ < tr >
37
+ < th scope ="row "> < strong > Envelope Count</ strong > </ th >
38
+ < td > {{.Storage.EnvelopeCount}}</ td >
39
+ </ tr >
40
+ < tr >
41
+ < th scope ="row "> < strong > Attachment Count</ strong > </ th >
42
+ < td > {{.Storage.AttachmentCount}}</ td >
43
+ </ tr >
44
+ < tr >
45
+ < th scope ="row "> < strong > Attachment Size</ strong > </ th >
46
+ < td > {{bytesHumanize .Storage.AttachmentSize}}</ td >
47
+ </ tr >
48
+ < tr >
49
+ < th scope ="row "> < strong > Database Size</ strong > </ th >
50
+ < td > {{bytesHumanize .Storage.DatabaseSize}}</ td >
51
+ </ tr >
52
+ </ tbody >
53
+ </ table >
54
+ {{end}}
55
+ </ figure >
14
56
< div class ="grid ">
15
57
< form method ="post " action ="/vacuum " hx-post ="/vacuum " class ="pico-form-reset ">
16
58
< button data-loading-path ="/vacuum " data-loading-disable data-loading-aria-busy
@@ -37,7 +79,11 @@ <h2>Retention Policy</h2>
37
79
< table >
38
80
< tbody >
39
81
< tr >
40
- < th scope ="row "> < strong > Minimum Age</ strong > </ th >
82
+ < th scope ="row ">
83
+ < strong >
84
+ Minimum Age
85
+ </ strong >
86
+ </ th >
41
87
< td > {{.RetentionPolicy.MinAge}}</ td >
42
88
</ tr >
43
89
{{if not (eq .RetentionPolicy.EnvelopeCount nil)}}
@@ -94,4 +140,4 @@ <h2>Build</h2>
94
140
</ article >
95
141
</ main >
96
142
97
- {{template "p /footer" .}}
143
+ {{template "partials /footer" .}}
0 commit comments