github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/tools/syz-testbed/templates/table.html (about)

     1  {{define "PrintExtra"}}
     2  	{{if .PercentChange}}
     3  		{{$numVal := (dereference .PercentChange)}}
     4  		{{if ge $numVal 0.0}}
     5  			<span class="positive-delta">
     6  		{{else}}
     7  			<span class="negative-delta">
     8  		{{end}}
     9  		{{printf "%+.1f" $numVal}}%
    10  		</span>
    11  	{{end}}
    12  	{{if .PValue}}
    13  		p={{printf "%.2f" (dereference .PValue)}}
    14  	{{end}}
    15  {{end}}
    16  
    17  {{$uiTable := .}}
    18  {{if .Table}}
    19  {{if $uiTable.AlignedBy}}
    20  	The data are aligned by {{$uiTable.AlignedBy}} <br />
    21  {{end}}
    22  <table class="list_table">
    23  	<thead><tr>
    24  	<th>{{.Table.TopLeftHeader}}</th>
    25  	{{range $c := .Table.ColumnHeaders}}
    26  		<th>
    27  		{{$url := ""}}
    28                  {{if $uiTable.ColumnURL}}{{$url = (call $uiTable.ColumnURL $c)}}{{end}}
    29  			{{if $url}}<a href="{{$url}}">{{$c}}</a>
    30  			{{else}}
    31  			{{$c}}
    32  			{{end}}
    33  		</th>
    34  		{{if $uiTable.Extra}}
    35  		<th>Δ</th>
    36  		{{end}}
    37  	{{end}}
    38  	</tr></thead>
    39  	<tbody>
    40  	{{range $r := .Table.SortedRows}}
    41  	<tr>
    42  		<td>
    43  		{{$url := ""}}
    44                  {{if $uiTable.RowURL}}{{$url = (call $uiTable.RowURL $r)}}{{end}}
    45  			{{if $url}}<a href="{{$url}}">{{$r}}</a>
    46  			{{else}}
    47  			{{$r}}
    48  			{{end}}
    49  		</td>
    50  		{{range $c := $uiTable.Table.ColumnHeaders}}
    51  			{{$cell := ($uiTable.Table.Get $r $c)}}
    52  			<td>{{if $cell}}{{$cell}}{{end}}</td>
    53  			{{if $uiTable.Extra}}
    54  			<td>{{if $cell}}{{template "PrintExtra" $cell}}{{end}}</td>
    55  		        {{end}}
    56  		{{end}}
    57  	</tr>
    58  	{{end}}
    59  	{{if $uiTable.HasFooter}}
    60  		<tr>
    61  			<td>-</td>
    62  			{{range $c := $uiTable.Table.ColumnHeaders}}
    63  				<td>{{$uiTable.Table.GetFooterValue $c}}</td>
    64  			{{end}}
    65  		</tr>
    66  	{{end}}
    67  	</tbody>
    68  </table>
    69  {{end}}