Debian Codegraph @

internal/nettrace/templates/index.html.tmpl

raw
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <style>
5 {{template "style.css"}}
6 </style>
7
8 <title>
9 {{if .Trace}}{{.Trace.Family}} - {{.Trace.Title}}
10 {{else if .BucketStr}}{{.Family}} - {{.BucketStr}}
11 {{else if .Latencies}}{{.Family}} - latency
12 {{else}}Traces
13 {{end}}
14 </title>
15
16 </head>
17
18 <body>
19 <h1>Traces</h1>
20
21 <table class="index">
22 {{range $name, $ftr := .FamTraces}}
23 <tr>
24 <td class="family">
25 <a href="?fam={{$name}}&b=0&all=true">
26 {{if eq $name $.Family}}<u>{{end}}
27 {{$name}}
28 {{if eq $name $.Family}}</u>{{end}}
29 </a>
30 </td>
31
32 <td class="bucket active">
33 {{$n := $ftr.LenActive}}
34 {{if and (eq $name $.Family) (eq "active" $.BucketStr)}}<u>{{end}}
35
36 <a href="?fam={{$name}}&b=-1&all={{$.AllGT}}"
37 {{if eq $n 0}}class="muted"{{end}}>
38 {{$n}} active</a>
39
40 {{if and (eq $name $.Family) (eq "active" $.BucketStr)}}</u>{{end}}
41 </td>
42
43 {{range $i, $b := $.Buckets}}
44 <td class="bucket">
45 {{$n := $ftr.LenBucket $i}}
46 {{if and (eq $name $.Family) (eq $b.String $.BucketStr)}}<u>{{end}}
47
48 <a href="?fam={{$name}}&b={{$i}}&all={{$.AllGT}}"
49 {{if eq $n 0}}class="muted"{{end}}>
50 &ge;{{$b}}</a>
51
52 {{if and (eq $name $.Family) (eq $b.String $.BucketStr)}}</u>{{end}}
53 </td>
54 {{end}}
55
56 <td class="bucket">
57 {{$n := $ftr.LenErrors}}
58 {{if and (eq $name $.Family) (eq "errors" $.BucketStr)}}<u>{{end}}
59
60 <a href="?fam={{$name}}&b=-2&all={{$.AllGT}}"
61 {{if eq $n 0}}class="muted"{{end}}>
62 errors</a>
63
64 {{if and (eq $name $.Family) (eq "errors" $.BucketStr)}}</u>{{end}}
65 </td>
66
67 <td class="bucket">
68 <a href="?fam={{$name}}&lat=true&all={{$.AllGT}}">[latency]</a>
69 </td>
70 </tr>
71 {{end}}
72 </table>
73 <br>
74 Show: <a href="?fam={{.Family}}&b={{.Bucket}}&all=false">
75 {{if not .AllGT}}<u>{{end}}
76 Only in bucket</a>
77 {{if not .AllGT}}</u>{{end}}
78 /
79 <a href="?fam={{.Family}}&b={{.Bucket}}&all=true">
80 {{if .AllGT}}<u>{{end}}
81 All &ge; bucket</a>
82 {{if .AllGT}}</u>{{end}}
83 <p>
84
85 <!--------------------------------------------->
86 {{if .Error}}
87 <p class="error">Error: {{.Error}}</p>
88 {{end}}
89
90 <!--------------------------------------------->
91 {{if .BucketStr}}
92 <h2>{{.Family}} - {{.BucketStr}}</h2>
93
94 <table class="trace">
95 <thead>
96 <tr>
97 <th>Timestamp</th>
98 <th>Elapsed (s)</th>
99 <th>Message</th>
100 </tr>
101 </thead>
102 <tbody>
103 <tr>
104 <td>&nbsp;</td>
105 </tr>
106 {{range .Traces}}
107 {{template "_single.html.tmpl" .}}<p>
108 {{end}}
109 </tbody>
110 </table>
111
112 <p>
113 {{end}}
114
115 <!--------------------------------------------->
116 {{if .Latencies}}
117 <h2>{{.Family}} - latency</h2>
118 {{template "_latency.html.tmpl" .}}<p>
119 {{end}}
120
121 <!--------------------------------------------->
122 {{if .Trace}}
123 <h2>{{.Trace.Family}} - <i>{{.Trace.Title}}</i></h2>
124 {{template "_recursive.html.tmpl" .}}<p>
125 {{end}}
126
127 </body>
128
129 </html>