-
Notifications
You must be signed in to change notification settings - Fork 5
/
bot.tmpl
56 lines (52 loc) · 1.2 KB
/
bot.tmpl
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
<html><title>bot report</title><body><h1>Active Bot Report</h1>
{{range .Bots}}
<h2>{{.Id}}</h2>
<p>
Nick: {{.Nick}}<br/>
Server: {{.ServerURL}}<br/>
Online since: {{.Start.T.Format "Mon Jan 2 15:04:05 MST 2006"}}<br/>
Uptime: {{.Start.Elapsed}}<br/>
Rate Limit: {{.RateMs}}ms<br/>
Messages Sent: {{.TxMsgs}}<br/>
Messages Received: {{.RxMsgs}}<br/>
Channels:
{{range $ch, $_ := .State.Channels}}
{{$ch}}
{{end}}
<br/>
Tasks:
<table style="margin-left: 1em;">
<tr><td>Task</td><td>Lines</td><td>Wall time</td></tr>
{{range $tid, $task := .Tasks.Tasks}}
<tr>
<td>{{$task.Name}}</td>
<td style="text-align: right;">{{$task.Lines}}</td>
<td style="text-align: right;">{{$task.Start.Elapsed}}</td>
</tr>
{{end}}
</table>
Patterns:
<table style="margin-left: 1em;">
{{range .Patterns}}
<tr>
<td style="border: 1px solid blue;">{{.Match}}</td>
<td>→</td>
<td style="border: 1px solid red;">{{.Template}}</td>
</tr>
{{end}}
</table>
Raw Patterns:
<table style="margin-left: 1em;">
{{range .PatternsRaw}}
<tr>
<td style="border: 1px solid blue;">{{.Match}}</td>
<td>→</td>
<td style="border: 1px solid red;">{{.Template}}</td>
</tr>
{{end}}
</table>
</p>
<hr/>
{{end}}
Total bots: {{len .Bots}}
</body></html>