You must login to view /lordwelch/chasquid/commit/8c8e64dc2930e2641d014273c136de40dc080495?files=internal%2Fsmtpsrv.
The GitHub option should be usable for most people, it only links via username.

Files
chasquid/internal/nettrace/templates/_single.html.tmpl
Alberto Bertogli 9c6661eca2 nettrace: Add a new tracing library
This commit introduces a new tracing library, that replaces
golang.org/x/net/trace, and supports (amongts other thing) nested
traces.

This is a minimal change, future patches will make use of the new
functionality.
2022-11-13 11:09:19 +00:00

36 lines
946 B
Cheetah

<tr class="title">
<td class="when">{{.Start.Format "2006-01-02 15:04:05.000000"}}</td>
<td class="duration">{{.Duration | roundSeconds}}</td>
<td><a href="?trace={{.ID}}">{{.Title}}</a>
{{if .Parent}}(parent: <a href="?trace={{.Parent.ID}}&ref={{.ID}}">
{{.Parent.Family}} - {{.Parent.Title}}</a>)
{{end}}
</td>
<tr>
{{$prev := .Start}}
{{range .Events}}
<tr>
<td class="when">{{.When.Format "15:04:05.000000"}}</td>
<td class="duration">{{(.When.Sub $prev) | stripZeros}}</td>
<td class="msg">
{{- if .Type.IsLog -}}
{{.Msg}}
{{- else if .Type.IsChild -}}
new child <a href="?trace={{.Ref.ID}}&ref={{$.ID}}">{{.Ref.Family}} {{.Ref.Title}}</a>
{{- else if .Type.IsLink -}}
<a href="?trace={{.Ref.ID}}&ref={{$.ID}}">{{.Msg}}</a>
{{- else if .Type.IsDrop -}}
<i>[ events dropped ]</i>
{{- else -}}
<i>[ unknown event type ]</i>
{{- end -}}
</td>
</tr>
{{$prev = .When}}
{{end}}
<tr>
<td>&nbsp;</td>
</tr>