{{define "content"}} {{template "heading" .}}
{{template "info" .}}
{{template "session" .}}
{{template "request" .}}
{{template "response" .}}
{{template "config" .}}
{{end}} {{define "old"}}
{{template "info" .}} {{template "session" .}} {{template "request" .}} {{template "response" .}}
{{template "config" .}}
{{end}} {{define "content2"}} {{$pconf := (jsonToPageConfig .Item.PageConfig )}} {{if .Item.Session.Valid}} {{$sess := (jsonToSession .Item.Session )}} {{end}} {{if .Item.ResponseStatus.Valid }} {{end}}

Info:

Cache{{if .Item.CacheHit}}HIT{{else}}MISS{{end}}
RID{{.Item.Rid}}
GID{{.Item.Gid}}
SID{{.Item.SessionID.String}}
Timestamp{{(intToTime .Item.Timestamp).Format "2006-01-02 15:04:05"}}
 

Config:

ForceUA{{$pconf.ForceUA}}
UaType{{$pconf.UaType}}
UseProxy{{$pconf.UseProxy}}
StickyCookies{{$pconf.StickyCookies}}
StickyUA{{$pconf.StickyUA}}
IgnoreInterceptions{{$pconf.IgnoreInterceptions}}
IgnoreAllInterceptions{{$pconf.IgnoreAllInterceptions}}
CacheFreshness{{$pconf.CacheFreshness}}
CacheServeFailures{{$pconf.CacheServeFailures}}
 

Session:

Session ID{{$sess.ID}}
User Agent{{$sess.UserAgent}}
Proxy IP{{hostname $sess.ProxyURL}}
Cookie Jar {{ range $key, $values := $sess.Cookies}} {{ end }}
{{ $key }} {{ range $value := $values }} {{$value}} {{end}}
CreatedAt{{$sess.CreatedAt.Format "2006-01-02 15:04:05"}}
 

Request:

Method{{.Item.RequestMethod}}
URL{{.Item.RequestURL}}
Header {{ range $key, $values := (jsonToHeader .Item.RequestHeader )}} {{ end }}
{{ $key }} {{ range $value := $values }} {{$value}} {{end}}
ContentLength{{.Item.RequestContentLength}}
Body{{if .Item.RequestBody.Valid}}{{printf "%s" .Item.RequestBody.Bytes}}{{end}}
 

Response:

Status{{.Item.ResponseStatus.String}}
Proto{{.Item.ResponseProto.String}}
Header {{ range $key, $values := (jsonToHeader .Item.ResponseHeader )}} {{ end }}
{{ $key }} {{ range $value := $values }} {{$value}} {{end}}
ContentLength{{if .Item.ResponseContentLength.Valid}}{{.Item.ResponseContentLength.Int64}}{{end}}
TransferEncoding {{ range $value := (jsonToSlice .Item.ResponseTransferEncoding) }} {{$value}} {{end}}
Body View Content
{{end}} {{define "info"}}

Request Info

GID
{{.Item.Gid}}
Request ID
{{.Item.Rid}}
Cache
{{if .Item.CacheHit}}HIT{{else}}MISS{{end}}
Session ID
{{.Item.SessionID.String}}
Timestamp
{{(intToTime .Item.Timestamp).Format "2006-01-02 15:04:05"}}
{{end}} {{define "config"}}

Config

{{$pconf := (jsonToPageConfig .Item.PageConfig )}}
ForceUA
{{$pconf.ForceUA}}
UaType
{{$pconf.UaType}}
UseProxy
{{$pconf.UseProxy}}
StickyCookies
{{$pconf.StickyCookies}}
StickyUA
{{$pconf.StickyUA}}
IgnoreInterceptions
{{ range $value := $pconf.IgnoreInterceptions }} {{$value}} {{end}}
IgnoreAllInterceptions
{{$pconf.IgnoreAllInterceptions}}
CacheFreshness
{{$pconf.CacheFreshness}}
CacheServeFailures
{{$pconf.CacheServeFailures}}
{{end}} {{define "session"}} {{if .Item.Session.Valid}}

Session

{{$sess := (jsonToSession .Item.Session )}}
Session ID
{{$sess.ID}}
User Agent
{{$sess.UserAgent}}
Proxy IP
{{$sess.ProxyURL}}
Cookie Jar
{{ range $key, $values := $sess.Cookies}} {{ end }}
{{ $key }} {{ range $value := $values }} {{$value}} {{end}}
CreatedAt
{{$sess.CreatedAt.Format "2006-01-02 15:04:05"}}
{{end}} {{end}} {{define "request"}}

Request

Method
{{.Item.RequestMethod}}
URL
{{.Item.RequestURL}}
Header
{{ range $key, $values := (jsonToHeader .Item.RequestHeader )}} {{ end }}
{{ $key }} {{ range $value := $values }} {{$value}} {{end}}
ContentLength
{{.Item.RequestContentLength}}
Body
{{if .Item.RequestBody.Valid}}{{printf "%s" .Item.RequestBody.Bytes}}{{end}}
{{end}} {{define "response"}} {{if .Item.ResponseStatus.Valid }}

Response

Status
{{.Item.ResponseStatus.String}}
Proto
{{.Item.ResponseProto.String}}
Header
{{ range $key, $values := (jsonToHeader .Item.ResponseHeader )}} {{ end }}
{{ $key }} {{ range $value := $values }} {{$value}} {{end}}
ContentLength
{{if .Item.ResponseContentLength.Valid}}{{.Item.ResponseContentLength.Int64}}{{end}}
TransferEncoding
{{ range $value := (jsonToSlice .Item.ResponseTransferEncoding) }} {{$value}} {{end}}
{{end}} {{end}} {{define "heading"}}

{{.Item.Rid}}

{{end}}